private void DisplayDepartmentRation() { decimal d = OAOfficeCommonClas.GetDepartmentRation(this.DepartmentID.ToString()); d *= 12m; this.txtPersonRation.Text = d.ToString("f2"); }
private OAOfficeResDepartmentApplication GetData() { OAOfficeResDepartmentApplication oAOfficeResDepartmentApplication = new OAOfficeResDepartmentApplication(); oAOfficeResDepartmentApplication.ACRecordID = Guid.Empty; oAOfficeResDepartmentApplication.ApplyDate = ((this.txtApplyDate.Text.Trim() == "") ? DateTime.Now : Convert.ToDateTime(this.txtApplyDate.Text.Trim())); string personInfo = OAOfficeCommonClas.GetPersonInfo(base.UserCode, "i_bmdm"); oAOfficeResDepartmentApplication.ApplyDepartment = ((personInfo == "") ? 0 : int.Parse(personInfo)); oAOfficeResDepartmentApplication.ApplyMan = base.UserCode; oAOfficeResDepartmentApplication.AuditState = -1; oAOfficeResDepartmentApplication.CorpCode = this.Session["CorpCode"].ToString(); if (this.OperateType == "upd") { oAOfficeResDepartmentApplication.DARecordID = this.InStorageID; } else { oAOfficeResDepartmentApplication.DARecordID = Guid.NewGuid(); } oAOfficeResDepartmentApplication.IsAbove = "0"; oAOfficeResDepartmentApplication.IsComplete = "0"; oAOfficeResDepartmentApplication.IsSubmit = "0"; oAOfficeResDepartmentApplication.RecordDate = DateTime.Now; oAOfficeResDepartmentApplication.UserCode = base.UserCode; oAOfficeResDepartmentApplication.Remark = this.txtRemark.Text.Trim(); return(oAOfficeResDepartmentApplication); }
protected void GVManager_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowIndex > -1) { DataRowView dataRowView = (DataRowView)e.Row.DataItem; e.Row.Attributes["onmouseover"] = "OnMouseOverRecord(this);"; e.Row.Attributes["onclick"] = "OnRecord(this);"; e.Row.Cells[0].Text = Convert.ToString(e.Row.RowIndex + 1); HtmlInputText htmlInputText = (HtmlInputText)e.Row.Cells[3].FindControl("txtRation"); htmlInputText.Attributes["onblur"] = "javascript:checkDecimal(this);"; e.Row.Cells[1].Text = OAOfficeCommonClas.GetChinaNum(dataRowView["PostLevel"].ToString()); } switch (e.Row.RowType) { case DataControlRowType.Header: case DataControlRowType.DataRow: e.Row.Cells[5].Style["display"] = "none"; break; case DataControlRowType.Footer: break; default: return; } }
private void AddDisplay() { this.txtApplyDate.Text = DateTime.Now.ToShortDateString(); this.txtApplyPerson.Text = BooksCommonClass.GetUserName(base.UserCode); string personInfo = OAOfficeCommonClas.GetPersonInfo(base.UserCode, "i_bmdm"); this.txtApplyDept.Text = BooksCommonClass.GetDepartmentName(int.Parse(personInfo)); }
private void DisplayDepartmentRation() { decimal d = OAOfficeCommonClas.GetDepartmentRation(this.DepartmentID.ToString()); this.LblMonth.Text = d.ToString("f2"); d *= 12m; this.LblRation.Text = d.ToString("f2"); this.LbAlready.Text = OAOfficeCommonClas.GetAlready(this.DepartmentID.ToString()).ToString("f2"); }
protected void GVBook_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowIndex > -1) { DataRowView dataRowView = (DataRowView)e.Row.DataItem; e.Row.Attributes["onmouseover"] = "OnMouseOverRecord(this);"; e.Row.Attributes["onclick"] = "OnRecord(this);ClickRow('" + dataRowView["RecordID"].ToString() + "');"; e.Row.Cells[0].Text = Convert.ToString(e.Row.RowIndex + 1); e.Row.Cells[1].Text = OAOfficeCommonClas.GetChinaNum(dataRowView["PositionLevel"].ToString()); } }
protected void GVBook_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowIndex > -1) { DataRowView dataRowView = (DataRowView)e.Row.DataItem; e.Row.Attributes["onmouseover"] = "OnMouseOverRecord(this);"; e.Row.Attributes["onclick"] = "OnRecord(this);"; e.Row.Cells[0].Text = Convert.ToString(e.Row.RowIndex + 1); decimal monthStat_Person = OAOfficeCommonClas.GetMonthStat_Person(dataRowView["v_bmbm"].ToString(), int.Parse(this.DDLYear.SelectedValue), int.Parse(this.DDLMonth.SelectedValue)); decimal monthStat_Department = OAOfficeCommonClas.GetMonthStat_Department(dataRowView["v_bmbm"].ToString(), int.Parse(this.DDLYear.SelectedValue), int.Parse(this.DDLMonth.SelectedValue)); e.Row.Cells[2].Text = Convert.ToString(monthStat_Person + monthStat_Department); } }
protected void GVBook_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowIndex > -1) { DataRowView dataRowView = (DataRowView)e.Row.DataItem; e.Row.Attributes["onmouseover"] = "OnMouseOverRecord(this);"; e.Row.Attributes["onclick"] = string.Concat(new string[] { "OnRecord(this);ClickRow('", dataRowView["v_yhdm"].ToString(), "','", dataRowView["PositionLevel"].ToString(), "');" }); e.Row.Cells[0].Text = Convert.ToString(e.Row.RowIndex + 1); e.Row.Cells[1].Text = BooksCommonClass.GetDepartmentName(int.Parse(dataRowView["i_bmdm"].ToString())); e.Row.Cells[3].Text = OAOfficeCommonClas.GetChinaNum(dataRowView["PositionLevel"].ToString()); e.Row.Cells[4].Text = OAOfficeCommonClas.GetPostAndRank(dataRowView["PostAndRank"].ToString()); } }
private void DisplayPersonRation() { DataTable personInfo = OAOfficeCommonClas.GetPersonInfo(this.UsePerson); if (personInfo.Rows.Count > 0) { DataRow dataRow = personInfo.Rows[0]; decimal d = OAOfficeCommonClas.GetPersonRation(dataRow["PostAndRank"].ToString()); string personInfo2 = OAOfficeCommonClas.GetPersonInfo(this.UsePerson, "EnterCorpDate"); DateTime dateTime = (personInfo2 == "") ? DateTime.Now : Convert.ToDateTime(personInfo2); if (dateTime.Year < DateTime.Now.Year) { d *= DateTime.Now.Month; } else { d *= DateTime.Now.Month - dateTime.Month + 1; } this.txtPersonRation.Text = d.ToString("f2"); } }
private bool IsPass() { decimal d = (this.txtPersonRation.Text.Trim() == "") ? 0m : Convert.ToDecimal(this.txtPersonRation.Text.Trim()); string personInfo = OAOfficeCommonClas.GetPersonInfo(this.UsePerson, "EnterCorpDate"); DateTime dateTime = (personInfo == "") ? DateTime.Now : Convert.ToDateTime(personInfo); string text; if (dateTime.Year < DateTime.Now.Year) { text = string.Concat(new object[] { "datediff(yyyy,'", DateTime.Now, "',a.ApplyDate)=0 and UseMan='", this.UsePerson, "'" }); } else { text = string.Concat(new object[] { "datediff(yyyy,'", DateTime.Now, "',a.ApplyDate)=0 and datediff(mm,'", dateTime, "',a.ApplyDate)>=0 and UseMan='", this.UsePerson, "'" }); } if (this.OperateType == "upd") { text = text + " and b.PADRecordID<>" + this.RecordID; } decimal d2 = this.amAction.GetApplyStat(text) + ((this.HdnPrice.Value.Trim() == "") ? 0m : Convert.ToDecimal(this.HdnPrice.Value.Trim())) * ((this.txtNumber.Text.Trim() == "") ? 0m : Convert.ToDecimal(this.txtNumber.Text.Trim())); return(d >= d2); }
protected void setData(string userCode) { DataTable dataTable = PersonnelAction.QueryPersonnelchInfoById(userCode); if (dataTable.Rows.Count == 1) { if (dataTable.Rows[0]["SuperordinateDuty"].ToString() != "") { int arg_5A_0 = (int)dataTable.Rows[0]["SuperordinateDuty"]; } this.Labbm.Text = PersonnelAction.getDeptName(System.Convert.ToInt32(this.DeptID.ToString())); this.labUserCode.Text = dataTable.Rows[0]["userCode"].ToString(); this.labname.Text = dataTable.Rows[0]["v_xm"].ToString(); this.labAge.Text = dataTable.Rows[0]["age"].ToString(); if (dataTable.Rows[0]["Sex"].ToString() != "") { if (dataTable.Rows[0]["Sex"].ToString() == "1") { this.labSex.Text = "男"; } else { this.labSex.Text = "女"; } } this.LabNation.Text = dataTable.Rows[0]["Nation"].ToString(); this.LabEducational.Text = dataTable.Rows[0]["EducationalBackground"].ToString(); this.Labhigt.Text = dataTable.Rows[0]["Stature"].ToString(); this.LabDuty.Text = dataTable.Rows[0]["dutyname"].ToString(); if (dataTable.Rows[0]["PositionLevel"].ToString() != "") { this.LabPositionLevel.Text = dataTable.Rows[0]["PositionLevel"].ToString() + "级"; } if (dataTable.Rows[0]["PostAndRank"].ToString() != "") { this.LabPostAndRank.Text = OAOfficeCommonClas.GetPostAndRank(dataTable.Rows[0]["PostAndRank"].ToString()); } this.LabAddress.Text = dataTable.Rows[0]["Address"].ToString(); this.LabRegisteredPlace.Text = dataTable.Rows[0]["RegisteredPlace"].ToString(); if (dataTable.Rows[0]["ClassID"].ToString() != "") { this.LabClassID.Text = DocumentAction.QueryOneDocumentClass(int.Parse(dataTable.Rows[0]["ClassID"].ToString())).Rows[0]["classname"].ToString(); } this.LabComputeLevel.Text = dataTable.Rows[0]["ComputeLevel"].ToString(); this.LabEnglishLevel.Text = dataTable.Rows[0]["EnglishLevel"].ToString(); if (dataTable.Rows[0]["Marriage"].ToString() != "") { this.LabMarriage.Text = dataTable.Rows[0]["Marriage"].ToString(); } this.LabPostcode.Text = dataTable.Rows[0]["Postcode"].ToString(); this.LabTel.Text = dataTable.Rows[0]["Tel"].ToString(); this.LabDriveLevel.Text = dataTable.Rows[0]["Drivelevel"].ToString(); if (!string.IsNullOrEmpty(dataTable.Rows[0]["ExpectationSalary"].ToString())) { this.LabtExpectationSalary.Text = System.Convert.ToInt32(dataTable.Rows[0]["ExpectationSalary"]).ToString(); } this.LabCommunicateAddress.Text = dataTable.Rows[0]["CommunicateAddress"].ToString(); if (dataTable.Rows[0]["UserPhoto"].ToString() != "") { this.Image1.ImageUrl = "~" + dataTable.Rows[0]["UserPhoto"].ToString(); this.annexName.InnerText = dataTable.Rows[0]["v_xm"].ToString() + "照片"; } else { this.Image1.ImageUrl = "~/images/PhotoDefault.gif"; } this.LabMobilePhoneCode.Text = dataTable.Rows[0]["MobilePhoneCode"].ToString(); if (!string.IsNullOrEmpty(dataTable.Rows[0]["Birthday"].ToString())) { this.LabBirthday.Text = System.DateTime.Parse(dataTable.Rows[0]["Birthday"].ToString()).ToShortDateString(); } this.LabIDCard.Text = dataTable.Rows[0]["IDCard"].ToString(); this.LabPoliticsFace.Text = dataTable.Rows[0]["PoliticsFace"].ToString(); if (!string.IsNullOrEmpty(dataTable.Rows[0]["JoinPartyDate"].ToString())) { this.LabJoinPartyDate.Text = System.DateTime.Parse(dataTable.Rows[0]["JoinPartyDate"].ToString()).ToShortDateString(); } this.LabJoinCorpMode.Text = dataTable.Rows[0]["JoinCorpMode"].ToString(); this.LabIntroducer.Text = dataTable.Rows[0]["Introducer"].ToString(); this.LabSpecialty.Text = dataTable.Rows[0]["Specialty"].ToString(); this.LabGraduateSchool.Text = dataTable.Rows[0]["GraduateSchool"].ToString(); this.LabLevel.Text = dataTable.Rows[0]["Level"].ToString(); if (!string.IsNullOrEmpty(dataTable.Rows[0]["BeginWorkDate"].ToString())) { this.LabBeginWorkDate.Text = System.DateTime.Parse(dataTable.Rows[0]["BeginWorkDate"].ToString()).ToShortDateString(); } if (!string.IsNullOrEmpty(dataTable.Rows[0]["EnterCorpDate"].ToString())) { this.LabEnterCorpDate.Text = System.DateTime.Parse(dataTable.Rows[0]["EnterCorpDate"].ToString()).ToShortDateString(); } this.LabtPostAndCompetency.Text = dataTable.Rows[0]["PostAndCompetency"].ToString(); this.Labnowstata.Text = dataTable.Rows[0]["statename"].ToString(); if (dataTable.Rows[0]["EndowmentInsurance"].ToString() == "1") { this.cblInsurance.Items[0].Selected = true; } if (dataTable.Rows[0]["MedicareInsurance"].ToString() == "1") { this.cblInsurance.Items[1].Selected = true; } if (dataTable.Rows[0]["UnemploymentInsurance"].ToString() == "1") { this.cblInsurance.Items[2].Selected = true; } if (dataTable.Rows[0]["InjuryInsurance"].ToString() == "1") { this.cblInsurance.Items[3].Selected = true; } if (dataTable.Rows[0]["HousingAccumulationFund"].ToString() == "1") { this.cblInsurance.Items[4].Selected = true; } if (dataTable.Rows[0]["PersonSuddennessInsurance"].ToString() == "1") { this.cblInsurance.Items[5].Selected = true; } if (!string.IsNullOrEmpty(dataTable.Rows[0]["conEndDate"].ToString())) { this.labconEndDate.Text = System.Convert.ToDateTime(dataTable.Rows[0]["conEndDate"]).ToString("yyyy-MM-dd"); } if (!string.IsNullOrEmpty(dataTable.Rows[0]["FormalDate"].ToString())) { this.labFormalData.Text = System.Convert.ToDateTime(dataTable.Rows[0]["FormalDate"].ToString()).ToString("yyyy-MM-dd"); } this.laburgentCellMan.Text = dataTable.Rows[0]["urgentCellMan"].ToString(); this.labucmConcern.Text = dataTable.Rows[0]["ucmConcern"].ToString(); this.labucmTel.Text = dataTable.Rows[0]["ucmTel"].ToString(); if (dataTable.Rows[0]["rdeNature"].ToString() != "") { this.labrdeNature.Text = dataTable.Rows[0]["rdeNature"].ToString(); } if (dataTable.Rows[0]["IsChargeMan"].ToString() == "True") { this.labChargeMan.Text = "是"; return; } this.labChargeMan.Text = "否"; } }