protected void InitPage() { if (!string.IsNullOrEmpty(base.Request["ic"])) { this.lblBllProducer.Text = PageHelper.QueryUser(this, base.UserCode); this.lblPrintDate.Text = System.DateTime.Now.ToShortDateString(); this.hfldPurchaseChecked.Value = base.Request["ic"]; BudIndirectDiaryCost byId = this.IndiCostSer.GetById(base.Request["ic"]); if (byId.CostType == "P") { this.lblPrjName.Text = this.GetPrjName(byId.ProjectId); this.lblPrjCode.Text = this.GetPrjCode(byId.ProjectId); } else { this.lblPrjNameTitle.Text = "部门名称"; this.lblPrjCodeTitle.Text = "部门全称"; this.lblPrjName.Text = this.GetDepName(byId.ProjectId); this.lblPrjCode.Text = this.GetDepFullName(byId.ProjectId); } this.lblCode.Text = byId.IndireCode; this.lblName.Text = byId.Name; this.lblDeparment.Text = byId.Department; this.lblInputDate.Text = byId.InputDate.ToString("yyyy-M-dd"); this.lblInputUser.Text = byId.InputUser; this.lblPeople.Text = byId.IssuedBy; } }
public string GetPrjOrOrg(object inDiaryIdObj) { string inDiaryId = inDiaryIdObj.ToString(); BudIndirectDiaryCost byId = this.cSer.GetById(inDiaryId); if (byId == null) { return(string.Empty); } string result = string.Empty; if (byId.CostType == "P") { PTPrjInfoService pTPrjInfoService = new PTPrjInfoService(); PTPrjInfo byId2 = pTPrjInfoService.GetById(byId.ProjectId); if (byId2 != null) { result = byId2.PrjName; } } else { PTdbmService pTdbmService = new PTdbmService(); PTdbm byId3 = pTdbmService.GetById(byId.ProjectId); if (byId3 != null) { result = byId3.V_bmqc; } } return(result); }
protected void SaveDiary() { this.txtName.Text.Trim(); this.txtDeparment.Text.Trim(); this.txtInputUser.Text.Trim(); System.Convert.ToDateTime(this.txtInputDate.Text); string arg_4F_0 = this.txtPeople.Text; this.ViewState["guid"].ToString(); string arg_76_0 = base.Request["prjId"]; this.txtIndireCode.Text.Trim(); this.hdnPeople.Value.Trim(); string arg_9F_0 = base.UserCode; this.txtConType.Text.Trim(); this.ViewState["pettyCashId"] = this.hfldPettyCashId.Value; if (string.IsNullOrEmpty(this.id)) { BudIndirectDiaryCost budIndirectDiaryCost = new BudIndirectDiaryCost(); budIndirectDiaryCost.InDiaryId = this.ViewState["guid"].ToString(); budIndirectDiaryCost.InputUserCode = base.UserCode; budIndirectDiaryCost.InssuedByCode = this.hdnPeople.Value.Trim(); budIndirectDiaryCost.Name = this.txtName.Text.Trim(); budIndirectDiaryCost.Department = this.txtDeparment.Text.Trim(); budIndirectDiaryCost.InputUser = this.txtInputUser.Text.Trim(); budIndirectDiaryCost.IssuedBy = this.txtPeople.Text.Trim(); budIndirectDiaryCost.InputDate = System.Convert.ToDateTime(this.txtInputDate.Text); budIndirectDiaryCost.ProjectId = base.Request["prjId"]; budIndirectDiaryCost.IndireCode = this.txtIndireCode.Text.Trim(); budIndirectDiaryCost.Type = "0"; budIndirectDiaryCost.IsAudit = false; budIndirectDiaryCost.AuditDate = System.DateTime.Now; budIndirectDiaryCost.CostType = this.costType; budIndirectDiaryCost.PettyCashId = this.hfldPettyCashId.Value; budIndirectDiaryCost.FlowState = -1; budIndirectDiaryCost.InputDate2 = System.DateTime.Now; this.budInCostSer.Add(budIndirectDiaryCost); return; } BudIndirectDiaryCost byId = this.budInCostSer.GetById(this.id); if (byId != null) { byId.InputUserCode = base.UserCode; byId.InssuedByCode = this.hdnPeople.Value.Trim(); if (this.hfldPettyCashId.Value != "") { byId.PettyCashId = this.hfldPettyCashId.Value; } byId.Name = this.txtName.Text.Trim(); byId.Department = this.txtDeparment.Text.Trim(); byId.InputUser = this.txtInputUser.Text.Trim(); byId.IssuedBy = this.txtPeople.Text.Trim(); byId.InputDate = System.Convert.ToDateTime(this.txtInputDate.Text); byId.ProjectId = base.Request["prjId"]; byId.IndireCode = this.txtIndireCode.Text.Trim(); this.budInCostSer.Update(byId); } }
private void SaveDiary() { BudIndirectDiaryCost byId = this.diarySer.GetById(this.diaryId); byId.IsAudit = true; byId.AuditDate = System.DateTime.Now; this.diarySer.Update(byId); }
public string IsAudit(string Id) { BudIndirectDiaryCost byId = this.budInCostSer.GetById(Id); if (byId == null) { return(string.Empty); } if (!byId.IsAudit) { return("未核销"); } return("已核销"); }
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 <BudIndirectDiaryDetails> list = this.ViewState["details"] as System.Collections.Generic.List <BudIndirectDiaryDetails>; BudIndirectDiaryCost budIndirectDiaryCost = new BudIndirectDiaryCost(); this.costType = budIndirectDiaryCost.CostType; foreach (string arg_4F_0 in listFromJson) { list.RemoveAll(new System.Predicate <BudIndirectDiaryDetails>(this.RemoveSearch)); } this.ViewState["details"] = list; this.gvDiaryDetails.EditIndex = -1; this.BindDetails(); }
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) { BudIndirectDiaryCost byId = this.IndiCostSer.GetById(current); if (byId != null) { this.IndiCostSer.Delete(byId); } else { base.RegisterScript("找不到要删除的组织机构日记对象"); } } this.BindGv(); }
protected void SaveEditData() { if (this.gvDiaryDetails.EditIndex != -1) { int editIndex = this.gvDiaryDetails.EditIndex; GridViewRow gridViewRow = this.gvDiaryDetails.Rows[editIndex]; System.Collections.Generic.List <BudIndirectDiaryDetails> list = this.ViewState["details"] as System.Collections.Generic.List <BudIndirectDiaryDetails>; BudIndirectDiaryDetails budIndirectDiaryDetails = list[gridViewRow.RowIndex]; BudIndirectDiaryCost budIndirectDiaryCost = new BudIndirectDiaryCost(); this.costType = budIndirectDiaryCost.CostType; budIndirectDiaryDetails.No = editIndex + 1; TextBox textBox = gridViewRow.Cells[2].FindControl("txtgvCode") as TextBox; if (textBox != null) { budIndirectDiaryDetails.IndetailsCode = textBox.Text.Trim(); } TextBox textBox2 = gridViewRow.Cells[3].FindControl("txtgvName") as TextBox; if (textBox2 != null) { budIndirectDiaryDetails.Name = textBox2.Text.Trim(); } TextBox textBox3 = gridViewRow.Cells[4].FindControl("txtgvAmount") as TextBox; if (textBox3 != null) { budIndirectDiaryDetails.Amount = decimal.Parse(textBox3.Text.Trim()); } DropDownList dropDownList = gridViewRow.Cells[5].FindControl("ddlCBSCode") as DropDownList; if (dropDownList != null) { budIndirectDiaryDetails.CBSCode = dropDownList.SelectedValue; } TextBox textBox4 = gridViewRow.Cells[6].FindControl("txtgvNote") as TextBox; if (textBox4 != null) { budIndirectDiaryDetails.Note = textBox4.Text.Trim(); } this.ViewState["details"] = list; } }
protected void InitEditPage() { BudIndirectDiaryCost byId = this.budInCostSer.GetById(this.id); this.txtName.Text = byId.Name; this.txtIndireCode.Text = byId.IndireCode; this.txtDeparment.Text = byId.Department; this.txtInputDate.Text = byId.InputDate.ToString("yyyy-M-dd"); this.txtInputUser.Text = byId.InputUser; this.txtPeople.Text = byId.IssuedBy; this.hdnPeople.Value = byId.InssuedByCode; this.hfldPettyCashId.Value = byId.PettyCashId; PCPettyCash byId2 = this.pettyCashSer.GetById(byId.PettyCashId); if (byId2 != null) { this.txtConType.Text = byId2.Matter; } this.costType = byId.CostType; this.ViewState["guid"] = base.Request["id"]; this.ViewState["details"] = this.GetDiaryDetails(this.id); this.BindDetails(); }
private void InitDiary() { BudIndirectDiaryCost byId = this.diarySer.GetById(this.diaryId); this.lblName.Text = byId.Name; this.lblInputDate.Text = byId.InputDate.ToString("yyyy-MM-dd"); this.lblDepartment.Text = byId.Department; this.lblInputUser.Text = byId.InputUser; this.lblIssueBy.Text = byId.IssuedBy; this.lblCode.Text = byId.IndireCode; if (byId.CostType == "P") { PTPrjInfoService pTPrjInfoService = new PTPrjInfoService(); PTPrjInfo byId2 = pTPrjInfoService.GetById(byId.ProjectId); if (byId2 != null) { this.lblPrjName.Text = byId2.PrjName; } } else { this.ltlCostTypeName.Text = "组织机构"; PTdbmService pTdbmService = new PTdbmService(); PTdbm byId3 = pTdbmService.GetById(byId.ProjectId); if (byId3 != null) { this.lblPrjName.Text = byId3.V_bmqc; } } PCPettyCashService pCPettyCashService = new PCPettyCashService(); PCPettyCash byId4 = pCPettyCashService.GetById(byId.PettyCashId); if (byId4 != null) { this.lblPettyCash.Text = byId4.Matter; } }
protected string GetDiaryDetail(int i, string t) { BudIndirectDiaryCost byId = this.IndiCostSer.GetById(this.ic); if (byId.CostType == "P") { this.lblProjectCode.Text = this.GetPrjCode(byId.ProjectId); } else { this.lblProjectCode.Text = this.GetDepFullName(byId.ProjectId); } this.lblPayMentDate.Text = System.DateTime.Now.ToShortDateString(); this.lblDepartMent.Text = byId.Department; this.lblOperator.Text = byId.InputUser; this.lblTotalMoney.Text = System.Convert.ToString(this.GetAmountSum()); this.lblFileNumber.Text = byId.IndireCode; System.Collections.Generic.IList <BudIndirectDiaryDetails> byDearyId = this.IndiDetailSer.GetByDearyId(this.ic); try { if (t == "name") { string result = byDearyId[i].Name; return(result); } if (t == "amount") { string result = byDearyId[i].Amount.ToString(); return(result); } } catch { } return(string.Empty); }