public void analyzeAttendance() { string message = "{}"; List <ColumnInfo> atdtParameters = null; List <ColumnInfo> personalParameters = null; bool includeLeave; bool includeOvertime; try { string record = this.Request["record"]; Hashtable ht = JavaScriptConvert.DeserializeObject <Hashtable>(record); try { atdtParameters = JavaScriptConvert.DeserializeObject <List <ColumnInfo> >(ht["atdateparams"].ToString()); personalParameters = JavaScriptConvert.DeserializeObject <List <ColumnInfo> >(ht["personalparams"].ToString()); includeLeave = ht["includelv"].ToString() == "Y"?true:false; includeOvertime = ht["includeot"].ToString() == "Y" ? true : false; } catch (Exception ex) { //message = "{status:'failure',msg:'" + HRMSRes.public_message_ + "'}"; Response.Write(message); return; } atanaattBll bll = new atanaattBll(); int total = 0; bll.AnalyzeAttendance(atdtParameters, personalParameters, includeLeave, includeOvertime); message = "{status:'success',msg:'Analyze success.'}"; } catch (Exception ex) { message = "{status:'failure',msg:'" + ExceptionPaser.Parse(HRMSRes.Public_Message_EditBad, ex, true) + "'}"; } Response.Write(message); }
public lvanalevBll() { localDal = new lvanalevDal(); baseDal = localDal; analatBll = new atanaattBll(); }
public otanaovtBll() { analatBll = new atanaattBll(); }
public void CarryForward(List <ColumnInfo> _carryforwardParameters, List <ColumnInfo> _personalParameters) { try { using (TransactionScope scope = new TransactionScope()) { int CarryStartYear = Convert.ToDateTime(_carryforwardParameters[0].ColumnValue).Year; int CarryEndYear = Convert.ToDateTime(_carryforwardParameters[1].ColumnValue).Year; List <vw_employment> lstStaff = null; string sSqlStaff = string.Empty; //期间内所有离职员工都不进行结转 atanaattBll bll = new atanaattBll(); bll.GetPersonals(_personalParameters, ref lstStaff, ref sSqlStaff, new DateTime(CarryEndYear, 12, 31).AddDays(1)); //得到休假类型 List <ColumnInfo> parameters = new List <ColumnInfo>() { new ColumnInfo() { ColumnName = "iscf", ColumnValue = "Y" } }; BaseBll bBll = new BaseBll(); List <tlvleatyp> lstLeaveType = bBll.GetSelectedRecords <tlvleatyp>(parameters); for (int i = 0; i < (CarryEndYear - CarryStartYear) + 1; i++) { //结转前删除所有的结转年度数据 parameters = new List <ColumnInfo>() { new ColumnInfo() { ColumnName = "year", ColumnValue = (CarryStartYear + i).ToString() } }; dal.DoMultiDelete <tlvcryfwd>(parameters); for (int n = 0; n < lstLeaveType.Count; n++) { string ltcd = lstLeaveType[n].ltcd; for (int j = 0; j < lstStaff.Count; j++) { DoCarryforward(lstStaff[j], ltcd, CarryStartYear + i); } } } scope.Complete(); } } catch (UtilException ex) { throw ex; } catch (Exception ex) { throw new UtilException(ex.Message, ex); } }