public DataView loadData(ListInfo info, DBManager db, Repeater repeater) { DBFilter filter = binding.createFilter(); if (info != null && info.orderby != null && !info.orderby.Equals("")) { filter.add(info.orderby, info.order); } string select = "c.*"; string from = "from " + db.dbclass.tableName + " c "; DataTable table = WebUtils.GetDataTableFromSelectQueryWithFilter(dbConn, select, from, filter, info); view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); } //int maxRowCount = 3; //if (!WebUtils.IsTrialVersion(Session)) //{ // if (WebUtils.productLicense(Session) != null) // maxRowCount = WebUtils.productLicense(Session).NumOfUsers; //} //if (view.ToTable().Rows.Count >= maxRowCount) // toolBar.NewButton_Visible = false; //else // toolBar.NewButton_Visible = toolBar.DeleteButton_Visible; return(view); }
public DataView loadData(ListInfo info, DBManager db, Repeater repeater) { DBFilter filter = binding.createFilter(); if (info != null && info.orderby != null && !info.orderby.Equals("")) { filter.add(info.orderby, info.order); } string select = "c.*, l.LeaveType"; string from = "from [" + db.dbclass.tableName + "] c LEFT JOIN " + ELeaveType.db.dbclass.tableName + " l ON c.LeaveTypeID=l.LeaveTypeID"; DataTable table = WebUtils.GetDataTableFromSelectQueryWithFilter(dbConn, select, from, filter, info); view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); } return(view); }
public DataView loadData(ListInfo info, DBManager db, Repeater repeater) { DBFilter filter = binding.createFilter(); if (!string.IsNullOrEmpty(txtRemoteProfileID.Text)) { DBFilter exchangeProfileFilter = new DBFilter(); exchangeProfileFilter.add(new Match("HSBCExchangeProfileRemoteProfileID", " LIKE ", "%" + txtRemoteProfileID.Text + "%")); filter.add(new IN("CompanyDBID", "SELECT CompanyDBID FROM " + EHSBCExchangeProfile.db.dbclass.tableName, exchangeProfileFilter)); } //if (info != null && info.orderby != null && !info.orderby.Equals("")) // filter.add(info.orderby, info.order); string select = "*"; string from = "from " + db.dbclass.tableName + " ";//LEFT JOIN " + EEmpPositionInfo.db.dbclass.tableName + " p ON c.EmpID=p.EmpID AND p.EmpPosEffTo IS NULL"; //filter.add(WebUtils.AddRankFilter(Session, "e.EmpID", true)); DataTable table = filter.loadData(dbConn, null, select, from); table = WebUtils.DataTableSortingAndPaging(table, info); view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); } return(view); }
public DataView loadData(ListInfo info, DBManager db, Repeater repeater) { DBFilter filter = new DBFilter(); //if (info != null && info.orderby != null && !info.orderby.Equals("")) // filter.add(info.orderby, info.order); string select = " cr.* , mscrm.*"; string from = "from [" + db.dbclass.tableName + "] mscrm, CessationReason cr "; filter.add(new MatchField("mscrm.CessationReasonID", "cr.CessationReasonID")); filter.add(new Match("MPFSchemeCessationReasonID", CurID)); if (string.IsNullOrEmpty(MPFSchemeID.Value)) { filter.add(new Match("MPFSchemeID", MPFSchemeID.Value)); } DataTable table = WebUtils.GetDataTableFromSelectQueryWithFilter(dbConn, select, from, filter, info); view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = table; repeater.DataBind(); } return(view); }
public DataView loadData(ListInfo info, DBManager db, Repeater repeater) { DBFilter filter = binding.createFilter(); DateTime dtFrom, dtTo; if (DateTime.TryParse(TrainingSeminarDateTo.Value, out dtTo)) { filter.add(new Match("TrainingSeminarDateFrom", "<=", dtTo)); } if (DateTime.TryParse(TrainingSeminarDateFrom.Value, out dtFrom)) { filter.add(new Match("TrainingSeminarDateTo", ">=", dtFrom)); } if (info != null && info.orderby != null && !info.orderby.Equals("")) { filter.add(info.orderby, info.order); } string select = "c.*"; string from = "from [" + db.dbclass.tableName + "] c "; DataTable table = WebUtils.GetDataTableFromSelectQueryWithFilter(dbConn, select, from, filter, info); view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); } return(view); }
public DataView LoadCompanyList(ListInfo info, Repeater repeater) { DBFilter filter = companySearchBinding.createFilter(); filter.add(new MatchField("c.CompanyID", "cbam.CompanyID")); if (info != null && info.orderby != null && !info.orderby.Equals("")) { filter.add(info.orderby, info.order); } string select = "c.*"; string from = "from " + ECompany.db.dbclass.tableName + " c, " + ECompanyBankAccountMap.db.dbclass.tableName + " cbam "; DataTable table = WebUtils.GetDataTableFromSelectQueryWithFilter(dbConn, select, from, filter, info); DataView view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); } return(view); }
//public void loadState() //{ // info = new ListInfo(); // int page = 0; // if (!CurPage.Value.Equals("")) // page = Int32.Parse(CurPage.Value); // info.loadState(Request, page); // info.order = Order.Value.Equals("True"); // info.orderby = OrderBy.Value; // if (info.orderby == "") // info.orderby = null; // info.recordPerPage = -1; //} public DataView loadData(ListInfo info, DBManager db, DataList repeater) { DBFilter filter = binding.createFilter(); DateTime dtPeriodFr, dtPeriodTo; if (DateTime.TryParse(RequestFromDate.Value, out dtPeriodFr)) { filter.add(new Match("RequestLeaveAppCancelCreateDateTime", ">=", dtPeriodFr)); } if (DateTime.TryParse(RequestToDate.Value, out dtPeriodTo)) { filter.add(new Match("RequestLeaveAppCancelCreateDateTime", "<", dtPeriodTo.AddDays(1))); } //if (info != null && info.orderby != null && !info.orderby.Equals("")) // filter.add(info.orderby, info.order); filter.add(new Match("c.EmpID", this.CurID)); if (!EmpRequestStatus.SelectedValue.Equals(string.Empty)) { if (EmpRequestStatus.SelectedValue.Equals("REQUEESTSTATUS_PROCESSING")) { //AND andTerms = new AND(); //andTerms.add(new Match("EmpRequestStatus", "<>", EEmpRequest.STATUS_APPROVED)); //andTerms.add(new Match("EmpRequestStatus", "<>", EEmpRequest.STATUS_CANCELLED)); //andTerms.add(new Match("EmpRequestStatus", "<>", EEmpRequest.STATUS_REJECTED)); filter.add(EEmpRequest.EndStatusDBTerms("EmpRequestStatus", true)); } else if (EmpRequestStatus.SelectedValue.Equals("REQUEESTSTATUS_END_PROCESS")) { //OR orTerms = new OR(); //orTerms.add(new Match("EmpRequestStatus", EEmpRequest.STATUS_APPROVED)); //orTerms.add(new Match("EmpRequestStatus", EEmpRequest.STATUS_CANCELLED)); //orTerms.add(new Match("EmpRequestStatus", EEmpRequest.STATUS_REJECTED)); filter.add(EEmpRequest.EndStatusDBTerms("EmpRequestStatus", false)); } } string select = "c.RequestLeaveAppCancelID, c.RequestLeaveAppCancelCreateDateTime, l.LeaveCode, l.LeaveCodeDesc, r.EmpRequestStatus, r.EmpRequestID, r.EmpRequestLastAuthorizationWorkFlowIndex, la.* "; string from = "from " + db.dbclass.tableName + " c " + " LEFT JOIN " + ELeaveApplication.db.dbclass.tableName + " la ON c.LeaveAppID = la.LeaveAppID " + " LEFT JOIN " + ELeaveCode.db.dbclass.tableName + " l ON la.LeaveCodeID=l.LeaveCodeID " + " LEFT JOIN " + EEmpRequest.db.dbclass.tableName + " r On r.EmpRequestRecordID = c.RequestLeaveAppCancelID and r.EmpRequestType = '" + EEmpRequest.TYPE_EELEAVECANCEL + "'"; DataTable table = filter.loadData(dbConn, info, select, from); view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); } return(view); }
public DataView loadData(ListInfo info, DBManager db, Repeater repeater) { DBFilter filter = sbinding.createFilter(); filter.add(new Match("CompanyDBID", this.CurID)); //if (info != null && info.orderby != null && !info.orderby.Equals("")) // filter.add(info.orderby, info.order); string select = "*"; string from = "from " + sdb.dbclass.tableName + " "; DataTable table = filter.loadData(dbConn, info, select, from); view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); } return view; }
public DataView loadData(ListInfo info, Repeater repeater) { if (IsPostBack) { selectedItemList = WebUtils.SelectedRepeaterItemToBaseObjectList(EUser.db, Repeater, "ItemSelect"); } DBFilter filter = binding.createFilter(); filter.add(new Match("UserAccountStatus", "<>", "D")); if (info != null && info.orderby != null && !info.orderby.Equals("")) { filter.add(info.orderby, info.order); } string select = "c.*"; string from = "from [" + EUser.db.dbclass.tableName + "] c "; DataTable table = WebUtils.GetDataTableFromSelectQueryWithFilter(dbConn, select, from, filter, info); view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); } return(view); }
public DataView loadData(ListInfo info, DBManager db, Repeater repeater) { DBFilter filter = binding.createFilter(); //if (info != null && info.orderby != null && !info.orderby.Equals("")) // filter.add(info.orderby, info.order); string select = "*"; string from = "from " + db.dbclass.tableName + " ";//LEFT JOIN " + EEmpPositionInfo.db.dbclass.tableName + " p ON c.EmpID=p.EmpID AND p.EmpPosEffTo IS NULL"; //filter.add(WebUtils.AddRankFilter(Session, "e.EmpID", true)); DataTable table = filter.loadData(dbConn, info, select, from); view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); } return(view); }
public DataView loadData(ListInfo info, DBManager db, DataList repeater) { DBFilter filter = sBinding.createFilter(); if (info != null && info.orderby != null && !info.orderby.Equals("")) { filter.add(info.orderby, info.order); } string select = "c.*"; string from = "from " + db.dbclass.tableName + " c "; //filter.add(new Match("EmpPayrollID",EmpPayrollID.Value)); DataTable table = WebUtils.GetDataTableFromSelectQueryWithFilter(dbConn, select, from, filter, info); //HROne.Common.DBAESEncryptDoubleFieldAttribute.decode(table, "PayRecActAmountEnc", "PayRecActAmount"); //HROne.Common.DBAESEncryptDoubleFieldAttribute.decode(table, "PayRecCalAmountEnc", "PayRecCalAmount"); ListFooter.Refresh(); view = new DataView(table); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); lblPaymentTotal.Text = dblTotalPaymentAmount.ToString("$#,##0.00"); } Changed(this, null); return(view); }
public DataView loadData(ListInfo info, DBManager db, Repeater repeater) { DBFilter filter = new DBFilter(); //if (info != null && info.orderby != null && !info.orderby.Equals("")) // filter.add(info.orderby, info.order); string select = " cc.* , eccd.*"; string from = "from [" + db.dbclass.tableName + "] cc, " + EEmpCostCenterDetail.db.dbclass.tableName + " eccd "; filter.add(new MatchField("eccd.CostCenterID", "cc.CostCenterID")); filter.add(new Match("eccd.EmpCostCenterID", CurID)); DataTable table = WebUtils.GetDataTableFromSelectQueryWithFilter(dbConn, select, from, filter, info); view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = table; repeater.DataBind(); } return(view); }
public DataView loadData(ListInfo info, DBManager db, Repeater repeater) { DBFilter filter = sbinding.createFilter(); filter.add(new Match("CompanyDBID", this.CurID)); DBFilter availableRemoteProfile = new DBFilter(); availableRemoteProfile.add(new Match("HSBCExchangeProfileIsLocked", false)); filter.add(new IN("HSBCExchangeProfileID", "SELECT HSBCExchangeProfileID FROM " + HROne.SaaS.Entities.EHSBCExchangeProfile.db.dbclass.tableName, availableRemoteProfile)); //if (info != null && info.orderby != null && !info.orderby.Equals("")) // filter.add(info.orderby, info.order); string select = "*"; string from = "from " + sdb.dbclass.tableName + " "; DataTable table = filter.loadData(masterDBConn, info, select, from); view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); } return(view); }
public DataView loadData(ListInfo info, DBManager db, Repeater repeater) { DBFilter filter = sbinding.createFilter(); //if (info != null && info.orderby != null && !info.orderby.Equals("")) // filter.add(info.orderby, info.order); string select = "e.*, ep.EmpPayrollID"; string from = "from [" + db.dbclass.tableName + "] e, EmpPayroll ep, PayrollPeriod pp"; filter.add(new Match("PayGroupID", PayGroupID.SelectedValue)); filter.add(new MatchField("e.EmpID", "ep.EmpID")); filter.add(new MatchField("ep.PayperiodID", "pp.PayperiodID")); filter.add(new Match("ep.EmpPayStatus", "T")); filter.add(WebUtils.AddRankFilter(Session, "e.EmpID", true)); filter.add(new IN("e.EmpID", "Select EmpID From " + EEmpPersonalInfo.db.dbclass.tableName + " ee", EmployeeSearchControl1.GetEmpInfoFilter(AppUtils.ServerDateTime(), AppUtils.ServerDateTime()))); DataTable table = filter.loadData(dbConn, null, select, from); table = EmployeeSearchControl1.FilterEncryptedEmpInfoField(table, info); view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); } return(view); }
public DataView loadData(ListInfo info, DBManager db, Repeater repeater) { DBFilter filter = new DBFilter(); filter.add(new Match("EmpID", this.CurID)); if (info != null && info.orderby != null && !info.orderby.Equals("")) { filter.add(info.orderby, info.order); } string select = "c.*"; string from = "from [" + sdb.dbclass.tableName + "] c "; DataTable table = WebUtils.GetDataTableFromSelectQueryWithFilter(dbConn, select, from, filter, info); view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); } return(view); }
public DataView loadData(ListInfo info, DBManager db, Repeater repeater) { DBFilter filter = binding.createFilter(); //if (info != null && info.orderby != null && !info.orderby.Equals("")) // filter.add(info.orderby, info.order); string select = "c.*, CONVERT(nvarchar(7), c.BonusProcessMonth, 21) BonusProcessMonth2 "; //string select = "c.* "; //string select = "c.*, l.MPFSchemeCode,l.MPFSchemeDesc"; string from = "from [" + db.dbclass.tableName + "] c "; DataTable table = WebUtils.GetDataTableFromSelectQueryWithFilter(dbConn, select, from, filter, info); view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); } return(view); }
public DataView loadData(ListInfo info, DBManager db, Repeater repeater) { DBFilter filter = new DBFilter(); filter.add(new Match("EmpID", this.CurID)); if (info != null && info.orderby != null && !info.orderby.Equals("")) { filter.add(info.orderby, info.order); } string select = "c.EmpTrainingEnrollID, ts.*, tc.TrainingCourseName"; string from = "from [" + sdb.dbclass.tableName + "] c LEFT JOIN " + ETrainingSeminar.db.dbclass.tableName + " ts ON c.TrainingSeminarID=ts.TrainingSeminarID" + " LEFT JOIN " + ETrainingCourse.db.dbclass.tableName + " tc ON tc.TrainingCourseID=ts.TrainingCourseID"; DataTable table = WebUtils.GetDataTableFromSelectQueryWithFilter(dbConn, select, from, filter, info); view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); } return(view); }
public DataView loadData(ListInfo info, DBManager db, DataList repeater) { DBFilter filter = sBinding.createFilter(); if (info != null && info.orderby != null && !info.orderby.Equals("")) { filter.add(info.orderby, info.order); } string select = "c.*"; string from = "from " + db.dbclass.tableName + " c "; //filter.add(new Match("EmpPayrollID",EmpPayrollID.Value)); DataTable table = WebUtils.GetDataTableFromSelectQueryWithFilter(dbConn, select, from, filter, info); ListFooter.Refresh(); view = new DataView(table); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); lblORSORITotal.Text = dblTotalORSORI.ToString("$#,##0.00"); lblORSOERTotal.Text = dblTotalORSOER.ToString("$#,##0.00"); lblORSOEETotal.Text = dblTotalORSOEE.ToString("$#,##0.00"); } return(view); }
public DataView loadData(ListInfo info, DBManager db, Repeater repeater) { DBFilter filter = sbinding.createFilter(); //if (info != null && info.orderby != null && !info.orderby.Equals("")) // filter.add(info.orderby, info.order); string select = " pc.* "; string from = "from " + db.dbclass.tableName + " pc "; filter.add(new Match("PaymentCodeIsTopUp", true)); //filter.add("PaymentCode", true); DataTable table = WebUtils.GetDataTableFromSelectQueryWithFilter(dbConn, select, from, filter, info); view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = table; repeater.DataBind(); } return(view); }
public DataView loadData(ListInfo info, DBManager db, Repeater repeater) { DBFilter filter = binding.createFilter(); //if (info != null && info.orderby != null && !info.orderby.Equals("")) // filter.add(info.orderby, info.order); filter.add(WebUtils.AddRankFilter(Session, "e.EmpID", true)); string select = "e.* "; string from = "from [" + db.dbclass.tableName + "] e "; //DataTable table = filter.loadData(info, select, from); DBFilter empInfoFilter = EmployeeSearchControl1.GetEmpInfoFilter(AppUtils.ServerDateTime(), AppUtils.ServerDateTime()); empInfoFilter.add(new MatchField("e.EmpID", "ee.EmpID")); filter.add(new Exists(EEmpPersonalInfo.db.dbclass.tableName + " ee", empInfoFilter)); DataTable table = filter.loadData(dbConn, null, select, from); table = EmployeeSearchControl1.FilterEncryptedEmpInfoField(table, info); view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); } return(view); }
//public void loadState() //{ // info = new ListInfo(); // int page = 0; // if (!CurPage.Value.Equals("")) // page = Int32.Parse(CurPage.Value); // info.loadState(Request, page); // info.order = Order.Value.Equals("True"); // info.orderby = OrderBy.Value; // if (info.orderby == "") // info.orderby = null; // info.recordPerPage = -1; //} public DataView loadData(ListInfo info, DBManager db, Repeater repeater) { DBFilter filter = binding.createFilter(); filter.add(new Match("rah.EmpRequestID", CurRequestID)); string select = "rah.* "; string from = "from " + EEmpRequestApprovalHistory.db.dbclass.tableName + " rah "; //DBFilter authorizerFilter = new DBFilter(); //authorizerFilter.add(new Match("EmpID", CurID)); //OR orFirstGrpStatusTerms = new OR(); //orFirstGrpStatusTerms.add(new Match("R.EmpRequestStatus", EEmpRequest.STATUS_SUBMITTED)); //DBFilter firstGrpFilter = new DBFilter(); //firstGrpFilter.add(orFirstGrpStatusTerms); //firstGrpFilter.add(orAuthorizationGrpApplicationTerms); //firstGrpFilter.add(new IN("AuthorizationGroupID", "Select AuthorizationGroupID from " + EAuthorizer.db.dbclass.tableName, authorizerFilter)); //OR orSecondGrpStatusTerms = new OR(); //orSecondGrpStatusTerms.add(new Match("R.EmpRequestStatus", EEmpRequest.STATUS_SUBMITTED)); //orSecondGrpStatusTerms.add(new Match("R.EmpRequestStatus", EEmpRequest.STATUS_ACCEPTED)); //DBFilter secondGrpFilter = new DBFilter(); //secondGrpFilter.add(orSecondGrpStatusTerms); //secondGrpFilter.add(orAuthorizationGrpApplicationTerms); //secondGrpFilter.add(new IN("AuthorizationGroupID", "Select AuthorizationGroupID from " + EAuthorizer.db.dbclass.tableName, authorizerFilter)); //OR orAuthorizationGrpFilter = new OR(); //orAuthorizationGrpFilter.add(new IN("EP.EmpFirstAuthorizationGp", "Select AuthorizationGroupID from " + EAuthorizationGroup.db.dbclass.tableName, firstGrpFilter)); //orAuthorizationGrpFilter.add(new IN("EP.EmpSecondAuthorizationGp", "Select AuthorizationGroupID from " + EAuthorizationGroup.db.dbclass.tableName, secondGrpFilter)); //filter.add(orAuthorizationGrpFilter); DataTable table = filter.loadData(dbConn, info, select, from); view = new DataView(table); ListFooter.Refresh(); if (table.Rows.Count > 0) { if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); } Visible = true; } else { Visible = false; } return(view); }
public DataView loadData(ListInfo info, DBManager db, DataList repeater) { DBFilter filter = binding.createFilter(); DateTime dtPeriodFr, dtPeriodTo; if (DateTime.TryParse(RequestFromDate.Value, out dtPeriodFr)) { filter.add(new Match("RequestLateWaiveCreateDate", ">=", dtPeriodFr)); } if (DateTime.TryParse(RequestToDate.Value, out dtPeriodTo)) { filter.add(new Match("RequestLateWaiveCreateDate", "<", dtPeriodTo.AddDays(1))); } filter.add(new Match("c.EmpID", this.CurID)); if (!EmpRequestStatus.SelectedValue.Equals(string.Empty)) { if (EmpRequestStatus.SelectedValue.Equals("REQUEESTSTATUS_PROCESSING")) { AND andTerms = new AND(); andTerms.add(new Match("EmpRequestStatus", "<>", EEmpRequest.STATUS_APPROVED)); andTerms.add(new Match("EmpRequestStatus", "<>", EEmpRequest.STATUS_CANCELLED)); andTerms.add(new Match("EmpRequestStatus", "<>", EEmpRequest.STATUS_REJECTED)); filter.add(andTerms); } else if (EmpRequestStatus.SelectedValue.Equals("REQUEESTSTATUS_END_PROCESS")) { OR orTerms = new OR(); orTerms.add(new Match("EmpRequestStatus", EEmpRequest.STATUS_APPROVED)); orTerms.add(new Match("EmpRequestStatus", EEmpRequest.STATUS_CANCELLED)); orTerms.add(new Match("EmpRequestStatus", EEmpRequest.STATUS_REJECTED)); filter.add(orTerms); } } string select = "c.*, a.AttendanceRecordDate, a.AttendanceRecordActualLateMins, r.EmpRequestStatus, r.EmpRequestLastAuthorizationWorkFlowIndex, r.EmpRequestID "; string from = "from [" + db.dbclass.tableName + "] c " + " LEFT JOIN " + EAttendanceRecord.db.dbclass.tableName + " a On c.AttendanceRecordID = a.AttendanceRecordID " + " LEFT JOIN " + EEmpRequest.db.dbclass.tableName + " r On r.EmpRequestRecordID = c.RequestLateWaiveID and r.EmpRequestType = '" + EEmpRequest.TYPE_EELATEWAIVE + "'"; DataTable table = filter.loadData(dbConn, info, select, from); view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); } return(view); }
//public void loadState() //{ // info = new ListInfo(); // int page = 0; // if (!CurPage.Value.Equals("")) // page = Int32.Parse(CurPage.Value); // info.loadState(Request, page); // info.order = Order.Value.Equals("True"); // info.orderby = OrderBy.Value; // if (info.orderby == "") // info.orderby = null; // info.recordPerPage = -1; //} public DataView loadData(ListInfo info, DBManager db, Repeater repeater) { DBFilter filter = binding.createFilter(); OR leaveCancelIDOrTerm = new OR(); leaveCancelIDOrTerm.add(new NullTerm("LeaveAppCancelID")); leaveCancelIDOrTerm.add(new Match("LeaveAppCancelID", "<=", 0)); filter.add(leaveCancelIDOrTerm); DateTime dtPeriodFr, dtPeriodTo; if (DateTime.TryParse(LeaveAppDateFrom.Value, out dtPeriodFr)) { filter.add(new Match("LeaveAppDateFrom", ">=", dtPeriodFr)); } if (DateTime.TryParse(LeaveAppDateTo.Value, out dtPeriodTo)) { filter.add(new Match("LeaveAppDateFrom", "<", dtPeriodTo.AddDays(1))); } string strPeriodStartDate = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_ESS_LEAVE_HISTORY_START_DATE); DateTime dtPeriodStartDate; if (DateTime.TryParse(strPeriodStartDate, out dtPeriodStartDate)) { filter.add(new Match("LeaveAppDateFrom", ">=", dtPeriodStartDate)); } //if (info != null && info.orderby != null && !info.orderby.Equals("")) // filter.add(info.orderby, info.order); filter.add(new Match("EmpID", this.CurID)); string select = "c.*, l.LeaveCode, l.LeaveCodeDesc"; string from = "from [" + db.dbclass.tableName + "] c LEFT JOIN " + ELeaveCode.db.dbclass.tableName + " l ON c.LeaveCodeID=l.LeaveCodeID"; DataTable table = filter.loadData(dbConn, info, select, from); view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); } return(view); }
public DataView loadData(ListInfo info, DBManager db, Repeater repeater) { DBFilter filter = sbinding.createFilter(); //if (info != null && info.orderby != null && !info.orderby.Equals("")) // filter.add(info.orderby, info.order); string select = " e.*, ca.CostAllocationID "; string from = "from " + EEmpPersonalInfo.db.dbclass.tableName + " e, " + ECostAllocation.db.dbclass.tableName + " ca"; filter.add(new MatchField("e.EmpID", "ca.EmpID")); filter.add(new Match("ca.CostAllocationStatus", "T")); DBFilter empPayrollFilter = new DBFilter(); empPayrollFilter.add(new Match("ep.EmpPayStatus", "C")); empPayrollFilter.add(new Match("ep.PayPeriodID", CurPayPeriodID)); // Start 0000185, KuangWei, 2015-04-21 //filter.add(WebUtils.AddRankFilter(Session, "e.EmpID", true)); // End 0000185, KuangWei, 2015-04-21 DBFilter inCostAllocationFilter = new DBFilter(); filter.add(new IN("ca.EmpPayrollID", "Select EmpPayrollID from " + EEmpPayroll.db.dbclass.tableName + " ep", empPayrollFilter)); // Start 0000185, KuangWei, 2015-04-21 DBFilter empInfoFilter = EmployeeSearchControl1.GetEmpInfoFilter(AppUtils.ServerDateTime(), AppUtils.ServerDateTime()); empInfoFilter.add(new MatchField("e.EmpID", "ee.EmpID")); filter.add(new Exists(EEmpPersonalInfo.db.dbclass.tableName + " ee", empInfoFilter)); DataTable table = WebUtils.GetDataTableFromSelectQueryWithFilter(dbConn, select, from, filter, info); table = EmployeeSearchControl1.FilterEncryptedEmpInfoField(table, info); // End 0000185, KuangWei, 2015-04-21 view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); } return(view); }
public DataView loadEmpData(ListInfo info, DBManager db, Repeater repeater) { WebDatePicker PayPeriodAsOFDate = (WebDatePicker)EmployeeSearchControl1.AdditionElementControl.FindControl("PayPeriodAsOFDate"); DBFilter filter = binding.createFilter(); //if (info != null && info.orderby != null && !info.orderby.Equals("")) // filter.add(info.orderby, info.order); string select = "e.*, ep.*, pp.PayPeriodFr, pp.PayperiodTo, pp.PayPeriodConfirmDate"; string from = "from [" + db.dbclass.tableName + "] e, EmpPayroll ep, PayrollPeriod pp "; filter.add(new MatchField("e.EmpID", "ep.EmpID")); filter.add(new MatchField("ep.PayperiodID", "pp.PayperiodID")); filter.add(new Match("ep.EmpPayStatus", "C")); filter.add(WebUtils.AddRankFilter(Session, "e.EmpID", true)); DateTime dtPayPeriodAsOFDate; if (DateTime.TryParse(PayPeriodAsOFDate.Value, out dtPayPeriodAsOFDate)) { filter.add(new Match("pp.PayPeriodFr", "<=", dtPayPeriodAsOFDate)); filter.add(new Match("pp.PayPeriodTo", ">=", dtPayPeriodAsOFDate)); } if (dtPayPeriodAsOFDate.Ticks.Equals(0)) { dtPayPeriodAsOFDate = AppUtils.ServerDateTime().Date; } filter.add(new IN("e.EmpID", "Select EmpID from " + EEmpPersonalInfo.db.dbclass.tableName + " ee", EmployeeSearchControl1.GetEmpInfoFilter(dtPayPeriodAsOFDate, dtPayPeriodAsOFDate))); //if (filter.getOrderClause().IndexOf("PayPeriodFr")<0) // filter.add("EmpNo", true); DataTable table = filter.loadData(dbConn, null, select, from); table = EmployeeSearchControl1.FilterEncryptedEmpInfoField(table, info); view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = table; repeater.DataBind(); } return(view); }
public DataView loadData(ListInfo info, DBManager db, Repeater repeater) { DBFilter filter = binding.createFilter(); //if (info != null && info.orderby != null && !info.orderby.Equals("")) // filter.add(info.orderby, info.order); filter.add(WebUtils.AddRankFilter(Session, "e.EmpID", true)); // only staffs with commission calculation is configured through latest Recurring Payment DBFilter m_rpFilter = new DBFilter(); OR m_or = new OR(); m_or.add(new NullTerm("EmpRPEffTo")); m_or.add(new Match("EmpRPEffTo", ">=", Utility.LastDateOfMonth(AppUtils.ServerDateTime()))); m_rpFilter.add(new Match("EmpRPEffFr", "<=", Utility.LastDateOfMonth(AppUtils.ServerDateTime()))); m_rpFilter.add(m_or); DBFilter m_isHitRateBasedFilter = new DBFilter(); m_isHitRateBasedFilter.add(new Match("PaymentCodeIsHitRateBased", true)); m_rpFilter.add(new IN("PayCodeID", "SELECT PaymentCodeID FROM PaymentCode", m_isHitRateBasedFilter)); filter.add(new IN("EmpID", "SELECT tmpRP.EmpID FROM EmpRecurringPayment tmpRP", m_rpFilter)); string select = "e.* "; string from = "from [" + db.dbclass.tableName + "] e "; //DataTable table = filter.loadData(info, select, from); DBFilter empInfoFilter = EmployeeSearchControl1.GetEmpInfoFilter(AppUtils.ServerDateTime(), AppUtils.ServerDateTime()); empInfoFilter.add(new MatchField("e.EmpID", "ee.EmpID")); filter.add(new Exists(EEmpPersonalInfo.db.dbclass.tableName + " ee", empInfoFilter)); DataTable table = filter.loadData(dbConn, null, select, from); table = EmployeeSearchControl1.FilterEncryptedEmpInfoField(table, info); view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); } return(view); }
public DataView loadData(ListInfo info, DBManager db, Repeater repeater) { // Start 0000183, KuangWei, 2015-04-10 if (isSupervisor(CurID)) { TeamRecordExport.Visible = true; } // End 0000183, KuangWei, 2015-04-10 DBFilter filter = sbinding.createFilter(); OR orTimeCardRecordHolder = new OR(); orTimeCardRecordHolder.add(new Match("EmpID", CurID)); //if (!string.IsNullOrEmpty(timeCardNo)) orTimeCardRecordHolder.add(new Match("TimeCardRecordCardNo", GetTimeCardNo(CurID))); filter.add(orTimeCardRecordHolder); DateTime dtTimeCardRecordDate; if (!DateTime.TryParse(TimeCardRecordDate.Value, out dtTimeCardRecordDate)) { dtTimeCardRecordDate = AppUtils.ServerDateTime().Date; } filter.add(new Match("TimeCardRecordDateTime", ">=", dtTimeCardRecordDate)); filter.add(new Match("TimeCardRecordDateTime", "<", dtTimeCardRecordDate.AddDays(1))); //if (info != null && info.orderby != null && !info.orderby.Equals("")) // filter.add(info.orderby, info.order); string select = "*"; string from = "from " + ETimeCardRecord.db.dbclass.tableName + ""; DataTable table = filter.loadData(dbConn, info, select, from); view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); } return(view); }
public DataView loadData(ListInfo info, DBManager db, DataList repeater) { DBFilter filter = binding.createFilter(); DateTime dtPeriodFr, dtPeriodTo; if (DateTime.TryParse(RequestFromDate.Value, out dtPeriodFr)) { filter.add(new Match("RequestOTClaimCancelCreateDateTime", ">=", dtPeriodFr)); } if (DateTime.TryParse(RequestToDate.Value, out dtPeriodTo)) { filter.add(new Match("RequestOTClaimCancelCreateDateTime", "<", dtPeriodTo.AddDays(1))); } filter.add(new Match("c.EmpID", this.CurID)); if (!EmpRequestStatus.SelectedValue.Equals(string.Empty)) { if (EmpRequestStatus.SelectedValue.Equals("REQUEESTSTATUS_PROCESSING")) { filter.add(EEmpRequest.EndStatusDBTerms("EmpRequestStatus", true)); } else if (EmpRequestStatus.SelectedValue.Equals("REQUEESTSTATUS_END_PROCESS")) { filter.add(EEmpRequest.EndStatusDBTerms("EmpRequestStatus", false)); } } string select = "c.RequestOTClaimCancelID, c.RequestOTClaimCancelCreateDateTime, r.EmpRequestStatus, r.EmpRequestID, r.EmpRequestLastAuthorizationWorkFlowIndex, la.* "; string from = "from " + db.dbclass.tableName + " c " + " LEFT JOIN " + EOTClaim.db.dbclass.tableName + " la ON c.OTClaimID = la.OTClaimID " + " LEFT JOIN " + EEmpRequest.db.dbclass.tableName + " r On r.EmpRequestRecordID = c.RequestOTClaimCancelID and r.EmpRequestType = '" + EEmpRequest.TYPE_EEOTCLAIM + "'"; DataTable table = filter.loadData(dbConn, info, select, from); view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); } return(view); }
public DataView loadData(ListInfo info, DBManager db, Repeater repeater) { string m_year = this.Year.Text; // ((TextBox)EmployeeSearchControl1.AdditionElementControl.FindControl("Year")).Text; string m_month = this.Month.SelectedValue; //((DropDownList)EmployeeSearchControl1.AdditionElementControl.FindControl("Month")).SelectedValue; if (!string.IsNullOrEmpty(m_year) && !string.IsNullOrEmpty(m_month)) { DBFilter filter = new DBFilter(); filter.add(getEffRangeDBTerm(m_year, m_month, null)); DBFilter empfilter = sbinding.createFilter(); empfilter.add(new IN("e.EmpID", "Select distinct EmpID from " + EEmpCostCenter.db.dbclass.tableName, filter)); // Start 0000110, Ricky So, 2014/12/16 DBFilter m_securityFilter = EmployeeSearchControl1.GetEmpInfoFilter(AppUtils.ServerDateTime(), AppUtils.ServerDateTime()); m_securityFilter.add(new MatchField("e.EmpID", "ee.EmpID")); empfilter.add(new Exists(EEmpPersonalInfo.db.dbclass.tableName + " ee", m_securityFilter)); //// Start 0000129, Ricky So, 2014/11/11 //empfilter.add(WebUtils.AddRankFilter(Session, "e.EmpID", true)); //// End 0000129, Ricky So, 2014/11/11 // End 0000110, Ricky So, 2014/12/16 string select = " e.* "; string from = " from " + db.dbclass.tableName + " e "; DataTable table = WebUtils.GetDataTableFromSelectQueryWithFilter(dbConn, select, from, empfilter, info); table = EmployeeSearchControl1.FilterEncryptedEmpInfoField(table, info); if (table.Rows.Count > 0) { panelPayPeriod.Visible = true; } view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); } } return(view); }
protected DataView loadData(ListInfo info, DBManager db, Repeater repeater) { DBFilter filter = sbinding.createFilter(); //Start 0000210, Miranda, 2015-06-14 //if (info != null && info.orderby != null && !info.orderby.Equals("")) // filter.add(info.orderby, info.order); //End 0000210, Miranda, 2015-06-14 DateTime dtPeriodFr, dtPeriodTo; if (DateTime.TryParse(RequestLateWaivePeriodFrom.Value, out dtPeriodFr)) { filter.add(new Match("AttendanceRecordDate", ">=", dtPeriodFr)); } if (DateTime.TryParse(RequestLateWaivePeriodTo.Value, out dtPeriodTo)) { filter.add(new Match("AttendanceRecordDate", "<", dtPeriodTo.AddDays(1))); } filter.add(new Match("AttendanceRecordActualLateMins", ">", 0)); OR m_or = new OR(); m_or.add(new Match("AttendanceRecordWaivedLateMins", 0)); m_or.add(new NullTerm("AttendanceRecordWaivedLateMins")); filter.add(m_or); // Start 0000112, Miranda, 2015-01-17 filter.add(new Match("EmpID", CurEmpID)); // End 0000112, Miranda, 2015-01-17 string select = "A.*, r.RosterCodeDesc"; string from = "from " + sdb.dbclass.tableName + " A LEFT JOIN " + ERosterCode.db.dbclass.tableName + " r ON A.RosterCodeID=r.RosterCodeID"; DataTable table = filter.loadData(dbConn, info, select, from); //DataTable table = WebUtils.GetDataTableFromSelectQueryWithFilter(dbConn, select, from, filter, info); view = new DataView(table); ListFooter.Refresh(); if (repeater != null) { repeater.DataSource = view; repeater.DataBind(); } return(view); }