using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Web;
|
using System.Web.UI;
|
using System.Web.UI.WebControls;
|
using System.Data;
|
using System.Data.SqlClient;
|
using CY.Model;
|
using CY.BLL;
|
using CY.Infrastructure.Common;
|
using CY.BLL.Sys;
|
using CY.BLL.EC;
|
using CY.Infrastructure.DESEncrypt;
|
using CY.Infrastructure.Query;
|
|
namespace CY.WebForm.Pages.workcar
|
{
|
//吴辉
|
//新增维修记录
|
public partial class CarrepairAdd : BasePage
|
{
|
OA_CarDictionaryBLL bll_OA_CarDictionaryBLL = null;
|
OA_CarrepairBLL oA_WorkReminderBll = null;
|
|
public CarrepairAdd()
|
{
|
bll_OA_CarDictionaryBLL = new OA_CarDictionaryBLL();
|
oA_WorkReminderBll = new OA_CarrepairBLL();
|
}
|
|
//页面加载
|
protected void Page_Load(object sender, EventArgs e)
|
{
|
if (!IsPostBack)
|
{
|
//this.selrepairType.DataSource = bll_OA_CarDictionaryBLL.SelectListByMemberIdAndParType(CurrentUser.MemberId, "维修类型");
|
//this.selrepairType.DataValueField = "ParName";
|
//this.selrepairType.DataTextField = "ParName";
|
//this.selrepairType.DataBind();
|
}
|
}
|
|
//表单提交
|
protected void btn_submit_form(object sender, EventArgs e)
|
{
|
try
|
{
|
if (string.IsNullOrEmpty(this.txtrepairTime.Value))
|
{
|
JavaScript.MessageBox("维修时间不能为空", this);
|
return;
|
}
|
|
DateTime nowTime = DateTime.Now;
|
OA_Carrepair m_OA_Carrepair = new OA_Carrepair();
|
m_OA_Carrepair.CarId = Request["carid"].ToInt32();
|
m_OA_Carrepair.repairPerson = this.txtrepairPerson.Value;
|
m_OA_Carrepair.repairTime = this.txtrepairTime.Value.ToDateTime2();
|
m_OA_Carrepair.repairType = "";
|
m_OA_Carrepair.repairMoney = this.txtrepairMoney.Value.ToDecimal2();
|
m_OA_Carrepair.repairRecord = this.txtrepairRecord.Value;
|
m_OA_Carrepair.Operator = CurrentUser.ShortName;
|
m_OA_Carrepair.LastUpdateTime = nowTime;
|
|
if (oA_WorkReminderBll.InsertModel(m_OA_Carrepair))
|
JavaScript.MessageBoxCloseAndRefreshFirst("新增成功", this);
|
else
|
JavaScript.MessageBox("操作失败", this);
|
}
|
catch (Exception ex)
|
{
|
PAGEHandleException(ex);
|
JavaScript.MessageBox("操作失败", this);
|
}
|
}
|
}
|
}
|