コード例 #1
0
ファイル: CostBudgetEdit.aspx.cs プロジェクト: zxl881203/src
 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;
     }
 }
コード例 #2
0
ファイル: CostBudgetEdit.aspx.cs プロジェクト: zxl881203/src
 private bool RemoveSearch(BudPreReimburseApplyDetail indirectDetail)
 {
     System.Collections.Generic.List <string> listFromJson = JsonHelper.GetListFromJson(this.hfldCheckedIds.Value);
     return(this.IsExist(indirectDetail.Id, listFromJson));
 }