Beispiel #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         this.rdbTypeIn.Checked = true;
         this.txtUser.Text      = this.yhmc.GetModelById(base.UserCode).v_xm;
         this.txtData.Text      = DateTime.Now.ToShortDateString();
         if (base.Request["type"].ToString() == "add")
         {
             this.txtInfoCode.Text = DateTime.Now.ToString("yyyyMMddHHmmss");
             this.hdfID.Value      = Guid.NewGuid().ToString();
         }
         else
         {
             if (base.Request["type"].ToString() == "edit")
             {
                 this.hdfID.Value = base.Request["id"].ToString();
                 this.bind();
             }
         }
         string        id    = base.Request["IEPid"].ToString();
         InExPlanModel model = this.IEPBLL.GetModel(id);
         this.txtIEPcode.Text = model.IEPNum;
         this.txtIEPname.Text = model.IEPname;
     }
 }
Beispiel #2
0
    public void bind()
    {
        string        id    = base.Request["ic"].ToString();
        InExPlanModel model = this.ieBLL.GetModel(id);

        this.txtCode.Text = model.IEPNum.ToString();
        this.txtData.Text = Convert.ToDateTime(model.IEPdate).ToShortDateString();
        this.txtName.Text = model.IEPname.ToString();
        this.txtType.Text = "";
        if (model.IEPtype.ToString() == "0")
        {
            this.txtType.Text = "月度";
        }
        else
        {
            if (model.IEPtype.ToString() == "1")
            {
                this.txtType.Text = "季度";
            }
            else
            {
                if (model.IEPtype.ToString() == "2")
                {
                    this.txtType.Text = "年度";
                }
            }
        }
        this.hdfCropCode.Value    = model.prjNum;
        this.hdfCropName.Value    = this.prj.GetModelByPrjGuid(this.hdfCropCode.Value.ToString()).PrjName;
        this.txtProjectName.Value = this.hdfCropName.Value;
    }
Beispiel #3
0
    public void bind()
    {
        string        id    = base.Request["id"].ToString();
        InExPlanModel model = this.ieBLL.GetModel(id);

        this.txtCode.Text          = model.IEPNum.ToString();
        this.txtData.Text          = Convert.ToDateTime(model.IEPdate).ToShortDateString();
        this.txtName.Text          = model.IEPname.ToString();
        this.ddlType.SelectedValue = model.IEPtype.ToString();
        this.hdnProjectCode.Value  = model.prjNum;
        this.hdnProjectCode.Value  = this.prj.GetModelByPrjGuid(this.hdnProjectCode.Value.ToString()).PrjName;
        this.txtProjectName.Value  = this.hdfCropName.Value;
    }
Beispiel #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         this.rdbTypeIn.Checked = true;
         this.txtUser.Text      = this.yhmc.GetModelById(base.UserCode).v_xm;
         this.txtData.Text      = DateTime.Now.ToShortDateString();
         this.hdfID.Value       = base.Request["id"].ToString();
         this.bind();
         string        id    = base.Request["IEPid"].ToString();
         InExPlanModel model = this.IEPBLL.GetModel(id);
         this.txtIEPcode.Text = model.IEPNum;
         this.txtIEPname.Text = model.IEPname;
     }
 }
Beispiel #5
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        string str = "";

        try
        {
            InExPlanModel inExPlanModel = new InExPlanModel();
            inExPlanModel.ID = this.hdfID.Value.ToString();
            if (this.txtData.Text.ToString() != "")
            {
                inExPlanModel.IEPdate = new DateTime?(Convert.ToDateTime(this.txtData.Text.ToString()));
            }
            else
            {
                inExPlanModel.IEPdate = new DateTime?(DateTime.Now);
            }
            inExPlanModel.IEPname = this.txtName.Text;
            inExPlanModel.IEPNum  = this.txtCode.Text;
            inExPlanModel.IEPtype = new int?(Convert.ToInt32(this.ddlType.SelectedValue.ToString()));
            inExPlanModel.prjNum  = this.hdnProjectCode.Value;
            inExPlanModel.state   = new int?(-1);
            if (base.Request["type"].ToString() == "add")
            {
                this.ieBLL.Add(inExPlanModel);
                str = "添加";
            }
            else
            {
                this.ieBLL.Update(inExPlanModel);
                str = "修改";
            }
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.Append("parent.desktop.flowclass.location='/AccountManage/IncomeExpensePlan/InExPlanList.aspx';");
            stringBuilder.Append("alert('系统提示:\\n\\n" + str + "成功!');").Append(Environment.NewLine);
            stringBuilder.Append("top.frameWorkArea.window.desktop.getActive().close();");
            base.RegisterScript(stringBuilder.ToString());
        }
        catch
        {
            base.RegisterScript("alert('系统提示:\\n\\n对不起" + str + "失败!');");
        }
    }
Beispiel #6
0
        public int Update(InExPlanModel ieModel)
        {
            SqlTransaction trans = null;

            return(this.iePlan.Update(trans, ieModel));
        }
Beispiel #7
0
        public int Add(InExPlanModel ieModel)
        {
            SqlTransaction trans = null;

            return(this.iePlan.Add(trans, ieModel));
        }