Ejemplo n.º 1
0
    private void RestoreCheckInfo(int ID)
    {
        EquipmentCheckInfo equipmentCheckInfo = new EquipmentCheckInfo();

        equipmentCheckInfo    = EquipmentCheckAction.GetSingleEquipmentCheckInfo(ID);
        this.txtCode.Text     = equipmentCheckInfo.CheckBillCode;
        this.txtTime.Text     = equipmentCheckInfo.CheckDate.ToString("yyyy-MM-dd");
        this.txtDept.Text     = equipmentCheckInfo.CheckDept;
        this.txtPerson.Text   = equipmentCheckInfo.CheckPerson;
        this.txtRemark.Text   = equipmentCheckInfo.Remark;
        this.txtDescript.Text = equipmentCheckInfo.ResultDescript;
        if (equipmentCheckInfo.InOrOut == 0)
        {
            this.RbtTypeIn.Checked = true;
        }
        else
        {
            this.RbtTypeOut.Checked = true;
        }
        if (equipmentCheckInfo.Result == 1)
        {
            this.RbtResultOk.Checked = true;
        }
        else
        {
            this.RbtResultNo.Checked = true;
        }
        this.ViewState["EQUIPMENTUNIQUECODE"] = equipmentCheckInfo.EquipmentUniqueCode;
    }
Ejemplo n.º 2
0
 protected void btnAdd_Click(object sender, EventArgs e)
 {
     if ((int)this.ViewState["CHECKID"] == 0)
     {
         if (EquipmentCheckAction.AddEquipmentCheck(this.GatherEquipmentCheckInfo()) != 1)
         {
             this.js.Text = "alert('增加失败!');";
             return;
         }
         EquipmentCheckInfo equipmentCheckInfo  = this.GatherEquipmentCheckInfo();
         EquipmentInfo      singleEquipmentInfo = EquipmentAction.GetSingleEquipmentInfo(equipmentCheckInfo.EquipmentUniqueCode);
         string             mes = string.Concat(new string[]
         {
             "设备检定通知:编号为",
             singleEquipmentInfo.EquipmentManCode,
             "的",
             singleEquipmentInfo.EquipmentName,
             ",本次检定日期于一个月后到期。"
         });
         DateTime time = equipmentCheckInfo.CheckDate.AddMonths(singleEquipmentInfo.CheckCycle).AddMonths(-1);
         this.getOrganiger(equipmentCheckInfo.EquipmentUniqueCode.ToString(), mes, base.UserCode.ToString(), time);
         this.js.Text = "alert('增加成功!');window.returnValue=true;window.close();";
         return;
     }
     else
     {
         if (EquipmentCheckAction.EditEquipmentCheck(this.GatherEquipmentCheckInfo()) != 1)
         {
             this.js.Text = "alert('更新失败!');";
             return;
         }
         this.js.Text = "alert('更新成功!');window.returnValue=true;window.close();";
         return;
     }
 }
Ejemplo n.º 3
0
    protected void btnDel_Click(object sender, EventArgs e)
    {
        EquipmentCheckInfo equipmentCheckInfo = new EquipmentCheckInfo();

        equipmentCheckInfo.NoteSequenceID = Convert.ToInt32(this.hdnChickId.Value);
        if (EquipmentCheckAction.DelEqiupmentCheckInfo(Convert.ToInt32(this.hdnChickId.Value)) != 1)
        {
            this.js.Text = "alert('删除数据出错!');";
        }
        this.BindDataGrid();
    }
Ejemplo n.º 4
0
 private void BindDataGrid(string beginDate, string endDate, int checkType)
 {
     this.GrdEquipmentCheckup.DataSource = EquipmentCheckAction.GetEquipmentCheckList(Convert.ToDateTime(beginDate), Convert.ToDateTime(endDate), checkType);
     this.GrdEquipmentCheckup.DataBind();
 }
Ejemplo n.º 5
0
 private void BindDataGrid()
 {
     this.GrdEquipmentCheckup.DataSource = EquipmentCheckAction.GetEquipmentCheckList(new Guid(this.hdnequipmentcode.Value));
     this.GrdEquipmentCheckup.DataBind();
 }