Ejemplo n.º 1
0
 protected void SaveEditData()
 {
     if (this.gvDiaryDetails.EditIndex != -1)
     {
         int         editIndex   = this.gvDiaryDetails.EditIndex;
         GridViewRow gridViewRow = this.gvDiaryDetails.Rows[editIndex];
         System.Collections.Generic.List <BudPreReimburseApplyDetail> list = this.ViewState["details"] as System.Collections.Generic.List <BudPreReimburseApplyDetail>;
         BudPreReimburseApplyDetail budPreReimburseApplyDetail             = list[gridViewRow.RowIndex];
         BudPreReimburseApply       budPreReimburseApply = new BudPreReimburseApply();
         this.costType = budPreReimburseApply.CostType;
         TextBox textBox = gridViewRow.Cells[2].FindControl("txtgvName") as TextBox;
         if (textBox != null)
         {
             budPreReimburseApplyDetail.Name = textBox.Text.Trim();
         }
         DropDownList dropDownList = gridViewRow.Cells[3].FindControl("ddlCBSCode") as DropDownList;
         if (dropDownList != null)
         {
             budPreReimburseApplyDetail.CBSCode = dropDownList.SelectedValue;
         }
         TextBox textBox2 = gridViewRow.Cells[4].FindControl("txtgvAmount") as TextBox;
         if (textBox2 != null)
         {
             budPreReimburseApplyDetail.Cost = decimal.Parse(textBox2.Text.Trim());
         }
         TextBox textBox3 = gridViewRow.Cells[5].FindControl("txtgvNote") as TextBox;
         if (textBox3 != null)
         {
             budPreReimburseApplyDetail.Note = textBox3.Text.Trim();
         }
         this.ViewState["details"] = list;
     }
 }
Ejemplo n.º 2
0
 public void InitPage()
 {
     if (!string.IsNullOrEmpty(this.Ic))
     {
         this.lblBllProducer.Text = PageHelper.QueryUser(this, base.UserCode);
         this.lblPrintDate.Text   = System.DateTime.Now.ToShortDateString();
         BudPreReimburseApply byId = this.budiApplySer.GetById(this.Ic);
         if (byId.CostType == "P")
         {
             this.lblPrjName.Text = this.GetPrjName(byId.PrjId);
             this.lblPrjCode.Text = this.GetPrjCode(byId.PrjId);
         }
         else
         {
             this.lblPrjNameTitle.Text = "部门名称";
             this.lblPrjCodeTitle.Text = "部门全称";
             this.lblPrjName.Text      = this.GetDepName(byId.PrjId);
             this.lblPrjCode.Text      = this.GetDepFullName(byId.PrjId);
         }
         this.lblName.Text      = byId.Name;
         this.lblCode.Text      = byId.Code;
         this.lblInputDate.Text = byId.ApplyDate.ToString("yyyy-M-dd");
         this.lblInputUser.Text = byId.RptUser;
     }
 }
Ejemplo n.º 3
0
    protected void SaveDiary()
    {
        if (string.IsNullOrEmpty(this.id))
        {
            BudPreReimburseApply budPreReimburseApply = new BudPreReimburseApply();
            budPreReimburseApply.Id        = this.ViewState["guid"].ToString();
            budPreReimburseApply.PrjId     = base.Request["prjId"];
            budPreReimburseApply.Name      = this.txtName.Text.Trim();
            budPreReimburseApply.ApplyDate = System.Convert.ToDateTime(this.txtInputDate.Text);
            budPreReimburseApply.RptUser   = this.txtInputUser.Text.Trim();
            budPreReimburseApply.Code      = this.txtIndireCode.Text.Trim();
            budPreReimburseApply.CostType  = this.costType;
            budPreReimburseApply.FlowState = -1;
            budPreReimburseApply.InputDate = System.DateTime.Now;
            this.IndiApplySer.Add(budPreReimburseApply);
            return;
        }
        BudPreReimburseApply byId = this.IndiApplySer.GetById(this.id);

        if (byId != null)
        {
            byId.PrjId     = base.Request["prjId"];
            byId.Name      = this.txtName.Text.Trim();
            byId.ApplyDate = System.Convert.ToDateTime(this.txtInputDate.Text);
            byId.RptUser   = this.txtInputUser.Text.Trim();
            byId.Code      = this.txtIndireCode.Text.Trim();
            this.IndiApplySer.Update(byId);
        }
    }
Ejemplo n.º 4
0
    protected void InitEditPage()
    {
        BudPreReimburseApply byId = this.IndiApplySer.GetById(this.id);

        this.txtName.Text         = byId.Name;
        this.txtInputDate.Text    = byId.InputDate.ToString("yyyy-M-dd");
        this.txtInputUser.Text    = byId.RptUser;
        this.txtIndireCode.Text   = byId.Code;
        this.costType             = byId.CostType;
        this.ViewState["guid"]    = base.Request["id"];
        this.ViewState["details"] = this.GetApplyDetails(this.id);
        this.BindDetails();
    }
Ejemplo n.º 5
0
    protected void btnDel_Click(object sender, System.EventArgs e)
    {
        this.SaveEditData();
        System.Collections.Generic.List <string> listFromJson             = JsonHelper.GetListFromJson(this.hfldCheckedIds.Value);
        System.Collections.Generic.List <BudPreReimburseApplyDetail> list = this.ViewState["details"] as System.Collections.Generic.List <BudPreReimburseApplyDetail>;
        BudPreReimburseApply budPreReimburseApply = new BudPreReimburseApply();

        this.costType = budPreReimburseApply.CostType;
        foreach (string arg_4F_0 in listFromJson)
        {
            list.RemoveAll(new System.Predicate <BudPreReimburseApplyDetail>(this.RemoveSearch));
        }
        this.ViewState["details"]     = list;
        this.gvDiaryDetails.EditIndex = -1;
        this.BindDetails();
    }
Ejemplo n.º 6
0
 protected void btnDel_Click(object sender, System.EventArgs e)
 {
     System.Collections.Generic.List <string> listFromJson = JsonHelper.GetListFromJson(this.hfldPurchaseChecked.Value);
     foreach (string current in listFromJson)
     {
         BudPreReimburseApply byId = this.IndiApplySer.GetById(current);
         if (byId != null)
         {
             this.IndiApplySer.Delete(byId);
         }
         else
         {
             base.RegisterScript("找不到要删除的组织机构日记对象");
         }
     }
     this.BindGv();
 }
    protected void InitEditPage()
    {
        BudPreReimburseModify byId = this.budModifySer.GetById(this.id);

        this.txtName.Text       = byId.Name;
        this.txtInputDate.Text  = byId.InputDate.ToString("yyyy-M-dd");
        this.txtInputUser.Text  = byId.RptUser;
        this.txtIndireCode.Text = byId.Code;
        this.hfldModifyId.Value = byId.ApplyId;
        BudPreReimburseApply byId2 = this.budApplySer.GetById(byId.ApplyId);

        if (byId2 != null)
        {
            this.txtIndireCode.Text = byId.Code;
        }
        this.costType             = byId.CostType;
        this.ViewState["guid"]    = base.Request["id"];
        this.ViewState["details"] = this.GetModifyDetails(this.id);
        this.BindDetails();
    }