Beispiel #1
0
    protected void btnSave_Click(object sender, System.EventArgs e)
    {
        if (string.IsNullOrEmpty(this.txtRetDate.Text.Trim()))
        {
            base.RegisterShow("系统提示", "复工日期必须输入!");
            return;
        }
        PTRetMsg model = this.GetModel();

        try
        {
            if (this.type == "edit")
            {
                this.retMsgServer.Update(model);
            }
            else
            {
                this.retMsgServer.Add(model);
            }
            base.RegisterScript("top.ui.tabSuccess({ parentName: '_RetMsgEdit' });");
        }
        catch
        {
            base.RegisterScript("top.ui.alert('该项目找不到对应的停工单,添加失败')");
        }
    }
Beispiel #2
0
    protected void BindInfos()
    {
        this.hfldRetMsgId.Value = this.retMsgId;
        PTRetMsg byId = this.retMsgServer.GetById(this.retMsgId);

        if (byId != null)
        {
            this.txtConstArea.Text        = byId.ConstArea;
            this.txtConstructionUnit.Text = byId.ConstUnit;
            this.txtProjectMileage.Text   = byId.ProjectMileage;
            this.txtRetDate.Text          = byId.RetDate.ToString("yyyy-MM-dd");
            this.txtMainContent.Text      = byId.MainContent;
            this.txtSupervisorSign.Text   = byId.SupervisorSign;
            if (byId.SupervisorSignDate.HasValue)
            {
                this.txtSupervisorSignDate.Text = byId.SupervisorSignDate.Value.ToString("yyyy-MM-dd");
            }
            this.txtGeneralSign.Text = byId.GeneralSign;
            if (byId.GeneralSignDate.HasValue)
            {
                this.txtGeneralSignDate.Text = byId.GeneralSignDate.Value.ToString("yyyy-MM-dd");
            }
            this.txtBuildUnitOpinion.Text = byId.BuildUnitOpinion;
            this.txtBuildUnitPerson.Text  = byId.BuildUnitPerson;
            if (byId.BuildUnitSignDate.HasValue)
            {
                this.txtBuildUnitSignDate.Text = byId.BuildUnitSignDate.Value.ToString("yyyy-MM-dd");
            }
            this.hfldInputDate.Value = byId.InputDate.ToString();
            this.hfldInputUser.Value = byId.InputUser;
        }
    }
Beispiel #3
0
 protected void btnDelete_Click(object sender, System.EventArgs e)
 {
     try
     {
         string   value = this.hfldRetMsgChecked.Value;
         PTRetMsg byId  = this.retMsgServer.GetById(value);
         this.retMsgServer.Delete(byId);
         this.BindGv();
         base.RegisterShow("系统提示", "删除成功!");
     }
     catch
     {
         base.RegisterShow("系统提示", "删除失败!");
     }
 }
Beispiel #4
0
    protected PTRetMsg GetModel()
    {
        PTRetMsg pTRetMsg = new PTRetMsg();

        pTRetMsg.RetMsgId       = this.hfldRetMsgId.Value;
        pTRetMsg.PrjGuid        = this.hfldPrjGuid.Value.Trim();
        pTRetMsg.ConstArea      = this.txtConstArea.Text.Trim();
        pTRetMsg.ConstUnit      = this.txtConstructionUnit.Text.Trim();
        pTRetMsg.ProjectMileage = this.txtProjectMileage.Text.Trim();
        pTRetMsg.RetDate        = System.Convert.ToDateTime(this.txtRetDate.Text.Trim());
        pTRetMsg.MainContent    = this.txtMainContent.Text.Trim();
        pTRetMsg.SupervisorSign = this.txtSupervisorSign.Text.Trim();
        pTRetMsg.StopMsgId      = this.hfldStopMsgId.Value.Trim();
        if (!string.IsNullOrEmpty(this.txtSupervisorSignDate.Text.Trim()))
        {
            pTRetMsg.SupervisorSignDate = new System.DateTime?(System.Convert.ToDateTime(this.txtSupervisorSignDate.Text.Trim()));
        }
        else
        {
            pTRetMsg.SupervisorSignDate = null;
        }
        pTRetMsg.GeneralSign = this.txtGeneralSign.Text.Trim();
        if (!string.IsNullOrEmpty(this.txtGeneralSignDate.Text.Trim()))
        {
            pTRetMsg.GeneralSignDate = new System.DateTime?(System.Convert.ToDateTime(this.txtGeneralSignDate.Text.Trim()));
        }
        else
        {
            pTRetMsg.GeneralSignDate = null;
        }
        pTRetMsg.BuildUnitOpinion = this.txtBuildUnitOpinion.Text;
        pTRetMsg.BuildUnitPerson  = this.txtBuildUnitPerson.Text;
        if (!string.IsNullOrEmpty(this.txtBuildUnitSignDate.Text.Trim()))
        {
            pTRetMsg.BuildUnitSignDate = new System.DateTime?(System.Convert.ToDateTime(this.txtBuildUnitSignDate.Text.Trim()));
        }
        else
        {
            pTRetMsg.BuildUnitSignDate = null;
        }
        pTRetMsg.FlowState = new int?(-1);
        pTRetMsg.InputUser = this.hfldInputUser.Value;
        pTRetMsg.InputDate = System.Convert.ToDateTime(this.hfldInputDate.Value);
        return(pTRetMsg);
    }
Beispiel #5
0
    protected void BindInfos()
    {
        string   text = "            年     月     日";
        PTRetMsg byId = this.retMsgService.GetById(this.retMsgId);

        if (byId != null)
        {
            ProjectInfo byId2 = ProjectInfo.GetById(byId.PrjGuid);
            this.txtPrjName.Text          = byId2.PrjName;
            this.txtConstArea.Text        = byId.ConstArea;
            this.txtConstructionUnit.Text = byId.ConstUnit;
            this.txtProjectMileage.Text   = byId.ProjectMileage;
            this.txtRetDate.Text          = byId.RetDate.ToString("yyyy年MM月dd日");
            this.txtMainContent.Text      = byId.MainContent;
            this.txtSupervisorSign.Text   = byId.SupervisorSign;
            if (byId.SupervisorSignDate.HasValue)
            {
                this.txtSupervisorSignDate.Text = byId.SupervisorSignDate.Value.ToString("yyyy年MM月dd日");
            }
            else
            {
                this.txtSupervisorSignDate.Text = text;
            }
            this.txtGeneralSign.Text = byId.GeneralSign;
            if (byId.GeneralSignDate.HasValue)
            {
                this.txtGeneralSignDate.Text = byId.GeneralSignDate.Value.ToString("yyyy年MM月dd日");
            }
            else
            {
                this.txtGeneralSignDate.Text = text;
            }
            this.txtBuildUnitOpinion.Text = byId.BuildUnitOpinion;
            this.txtBuildUnitPerson.Text  = byId.BuildUnitPerson;
            if (byId.BuildUnitSignDate.HasValue)
            {
                this.txtBuildUnitSignDate.Text = byId.BuildUnitSignDate.Value.ToString("yyyy年MM月dd日");
                return;
            }
            this.txtBuildUnitSignDate.Text = text;
        }
    }