protected void Page_Load(object sender, EventArgs e)
    {
        if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read))
        {
            return;
        }



        binding = new SearchBinding(dbConn, db);
        //binding.add(new LikeSearchBinder(EmpNo, "EmpNo"));
        //binding.add(new LikeSearchBinder(EmpName, "EmpEngSurname", "EmpEngOtherName", "EmpChiFullName"));
        //binding.add(new FieldDateRangeSearchBinder(JoinDateFrom, JoinDateTo, "EmpDateOfJoin").setUseCurDate(false));
        //binding.add(new DropDownVLSearchBinder(EmpStatus, "EmpStatus", EEmpPersonalInfo.VLEmpStatus).setLocale(ci));
        //binding.add(new DropDownVLSearchBinder((DropDownList)EmployeeSearchControl1.AdditionElementControl.FindControl("PayGroup"), "pp.PayGroupID", EPayrollGroup.VLPayrollGroup).setLocale(ci));
        binding.initValues("EmpStatus", null, EEmpPersonalInfo.VLEmpStatus, ci);
        binding.init(DecryptedRequest, null);

        info = ListFooter.ListInfo;

        HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls);

        if (!IsPostBack)
        {
            WebFormUtils.loadValues(dbConn, TrainingCourseList, ETrainingCourse.VLTrainingCourse, new DBFilter());
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        binding = new SearchBinding(dbConn, db);
        //binding.add(new LikeSearchBinder(EmpNo, "EmpNo"));
        //binding.add(new LikeSearchBinder(EmpEngSurname, "EmpEngSurname"));
        //binding.add(new LikeSearchBinder(EmpEngOtherName, "EmpEngOtherName"));
        //binding.add(new LikeSearchBinder(EmpChiFullName, "EmpChiFullName"));
        //binding.add(new LikeSearchBinder(EmpAlias, "EmpAlias"));
        //binding.add(new DropDownVLSearchBinder(EmpGender, "EmpGender", Values.VLGender).setLocale(ci));
        //binding.add(new FieldDateRangeSearchBinder(JoinDateFrom, JoinDateTo, "EmpDateOfJoin").setUseCurDate(false));
        //binding.add(new DropDownVLSearchBinder(EmpStatus, "EmpStatus", EEmpPersonalInfo.VLEmpStatus));
        //binding.initValues("EmpStatus", null, EEmpPersonalInfo.VLEmpStatus, ci);
        binding.init(DecryptedRequest, null);


        if (!Page.IsPostBack)
        {
            PositionList.LoadListControl(dbConn, EPosition.VLPosition, true);
            RankList.LoadListControl(dbConn, ERank.VLRank, false);
            EmploymentTypeList.LoadListControl(dbConn, EEmploymentType.VLEmploymentType, true);
            StaffTypeList.LoadListControl(dbConn, EStaffType.VLStaffType, true);
            PayrollGroupList.LoadListControl(dbConn, EPayrollGroup.VLPayrollGroup, true);


            //selected = PayGroupID.SelectedValue;
            //WebFormUtils.loadValues(PayGroupID, EPayrollGroup.VLPayrollGroup, new DBFilter(), null, (string)selected, (string)"combobox.notselected");

            string selected = EmpGender.SelectedValue;
            WebFormUtils.loadValues(dbConn, EmpGender, Values.VLGender, new DBFilter(), ci, (string)selected, (string)"combobox.notselected");
        }
    }
Esempio n. 3
0
    protected void TaxPaymentRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        string TaxFormCode = (string)e.Item.DataItem;

        Label lblTaxFormType = (Label)e.Item.FindControl("TaxFormType");

        lblTaxFormType.Text = "IR56" + TaxFormCode;
        DropDownList c = (DropDownList)e.Item.FindControl("TaxPayID");

        DBFilter TaxPaymentMapFilter = new DBFilter();

        TaxPaymentMapFilter.add(new Match("tpm.PaymentCodeID", CurID));

        DBFilter TaxPaymentFilter = new DBFilter();

        TaxPaymentFilter.add(new Match("TaxFormType", TaxFormCode));
        TaxPaymentFilter.add(new IN("TaxPayID", "Select tpm.TaxPayID FROM " + ETaxPaymentMap.db.dbclass.tableName + " tpm", TaxPaymentMapFilter));

        ArrayList taxPaymentList = ETaxPayment.db.select(dbConn, TaxPaymentFilter);
        string    selected       = null;

        if (taxPaymentList.Count > 0)
        {
            ETaxPayment taxPay = (ETaxPayment)taxPaymentList[0];
            selected = taxPay.TaxPayID.ToString();
        }
        DBFilter taxFormPaymentFilter = new DBFilter();

        taxFormPaymentFilter.add(new Match("TaxFormType", TaxFormCode));

        WebFormUtils.loadValues(dbConn, c, ETaxPayment.VLTaxPaymentWithNature, taxFormPaymentFilter, null, selected, "combobox.notselected");
        c.Attributes["TaxFormCode"] = TaxFormCode;
    }
Esempio n. 4
0
    protected void HierarchyLevel_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        EHierarchyLevel level  = (EHierarchyLevel)e.Item.DataItem;
        DBFilter        filter = new DBFilter();

        filter.add(new Match("HLevelID", level.HLevelID));
        filter.add(new Match("CompanyID", CompanyID.SelectedValue.Equals(string.Empty) ? "0" : CompanyID.SelectedValue));
        DropDownList  c        = (DropDownList)e.Item.FindControl("HElementID");
        EEmpHierarchy h        = (EEmpHierarchy)CurElements[level.HLevelID];
        string        selected = null;

        if (h != null)
        {
            selected = h.HElementID.ToString();
            EHierarchyElement element = new EHierarchyElement();
            element.HElementID = h.HElementID;
            EHierarchyElement.db.select(dbConn, element);
            Label HierarchyElementLabel = (Label)e.Item.FindControl("OldHElementID");

            HierarchyElementLabel.Text = element.HElementCode + " - " + element.HElementDesc;
        }
        else
        {
            c.Text = "";
        }
        WebFormUtils.loadValues(dbConn, c, EHierarchyElement.VLHierarchyElement, filter, null, selected, "combobox.notselected");
        c.Attributes["HLevelID"] = level.HLevelID.ToString();
    }
Esempio n. 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read))
        {
            return;
        }

        binding = new SearchBinding(dbConn, db);
        //binding.add(new FieldDateRangeSearchBinder(new HtmlInputText(CreateDateFrom.Value), new HtmlInputText(CreateDateTo.Value), "CreateDate").setUseCurDate(false));
        //binding.add(new DropDownVLSearchBinder(Position, "epi.PositionID", EPosition.VLPosition));
        binding.init(DecryptedRequest, null);


        if (!Page.IsPostBack)
        {
            DBFilter auditTrailFunctionIDFilter = new DBFilter();
            auditTrailFunctionIDFilter.add(new IN("FunctionID", "Select Distinct FunctionID from " + EAuditTrail.db.dbclass.tableName, new DBFilter()));
            WebFormUtils.loadValues(dbConn, FunctionID, ESystemFunction.VLSystemFunction, auditTrailFunctionIDFilter, ci, null, null);

            DBFilter auditTrailUserIDFilter = new DBFilter();
            auditTrailUserIDFilter.add(new IN("UserID", "Select Distinct UserID from " + EAuditTrail.db.dbclass.tableName, new DBFilter()));
            WebFormUtils.loadValues(dbConn, UserID, EUser.VLUserName, auditTrailUserIDFilter, ci, null, null);
        }

        HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls);
    }
Esempio n. 6
0
    protected void Page_PreRender(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            WebFormUtils.loadValues(dbConn, HLevel1, EHierarchyLevel.VLHierarchy, null);
            WebFormUtils.loadValues(dbConn, HLevel2, EHierarchyLevel.VLHierarchy, null);

            string hLevelIDListString = ESystemParameter.getParameter(dbConn, ESystemParameter.PARAM_CODE_PAYROLL_SUMMARY_HIERARCHY_DISPLAY_SEQUENCE);

            if (!string.IsNullOrEmpty(hLevelIDListString))
            {
                string[] hlevelIDList = hLevelIDListString.Split(new string[] { "|" }, StringSplitOptions.RemoveEmptyEntries);
                for (int count = 0; count < hlevelIDList.Length; count++)
                {
                    Control ctrl = this.Form.FindControl("mainContentPlaceHolder").FindControl("HLevel" + (count + 1));
                    if (ctrl is DropDownList)
                    {
                        try
                        {
                            ((DropDownList)ctrl).SelectedValue = hlevelIDList[count];
                        }
                        catch
                        {
                        }
                    }
                }
            }
            view = loadData(info, EEmpPayroll.db, Repeater);
        }
    }
 public void LoadListControl(DatabaseConnection dbConn, WFValueList ValueList, bool hasNotSelected)
 {
     WebFormUtils.loadValues(dbConn, CheckBoxListObject, ValueList, new DBFilter(), System.Threading.Thread.CurrentThread.CurrentUICulture, null, (string)"combobox.notselected");
     if (!hasNotSelected)
     {
         if (CheckBoxListObject.Items[0].Value.Equals(string.Empty))
         {
             CheckBoxListObject.Items.RemoveAt(0);
         }
     }
 }
 protected void LoadListControl(ListControl listControl, WFValueList ValueList, bool hasNotSelected)
 {
     WebFormUtils.loadValues(dbConn, listControl, ValueList, new DBFilter());
     if (!hasNotSelected)
     {
         if (listControl.Items[0].Value.Equals(string.Empty))
         {
             listControl.Items.RemoveAt(0);
         }
     }
 }
    protected void HierarchyLevel_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        EHierarchyLevel level  = (EHierarchyLevel)e.Item.DataItem;
        DBFilter        filter = new DBFilter();

        filter.add(new Match("HLevelID", level.HLevelID));

        DropDownList c        = (DropDownList)e.Item.FindControl("HElementID");
        string       selected = c.SelectedValue;

        WebFormUtils.loadValues(dbConn, c, EHierarchyElement.VLHierarchyElement, filter, ci, selected, "combobox.notselected");
        c.Attributes["HLevelID"] = level.HLevelID.ToString();
    }
    protected void RefreshClientSite(int RosterClientID)
    {
        string selected = RosterClientSiteID.SelectedValue;

        if (string.IsNullOrEmpty(selected))
        {
            selected = null;
        }
        DBFilter rosterClientSiteFilter = new DBFilter();

        rosterClientSiteFilter.add(new Match("RosterClientID", RosterClientID));
        WebFormUtils.loadValues(dbConn, RosterClientSiteID, ERosterClientSite.VLRosterClientSite, rosterClientSiteFilter, null, (string)selected, (string)"combobox.notselected");
    }
Esempio n. 11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        binding = new Binding(dbConn, db);
        string charSelected = CharCriteriaD.SelectedValue;
        string sizeSelected = SizeCriteriaD.SelectedValue;

        WebFormUtils.loadValues(dbConn, CharCriteriaD, CharCriteriaMethod, new DBFilter(), ci, (string)charSelected, null);
        WebFormUtils.loadValues(dbConn, SizeCriteriaD, SizeCriteriaMethod, new DBFilter(), ci, (string)sizeSelected, null);
        //binding.add(new DropDownVLBinder(db, ModuleName, EReportBuilderField.VLModuleCode));
        init_ModuleNameDropdown();
        init_FavriouteTemplates();
        binding.init(Request, Session);
        HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read))
        {
            return;
        }

        binding = new SearchBinding(dbConn, db);

        binding.init(DecryptedRequest, null);

        if (!IsPostBack)
        {
            WebFormUtils.loadValues(dbConn, EmpProbaUnit, Values.VLEmpUnit, null, null, string.Empty, "combobox.notselected");
        }

        info = ListFooter.ListInfo;
        HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        eBinding = new Binding(dbConn, EAttendanceRecord.db);
        eBinding.add(EmpID);
        eBinding.add(new HiddenBinder(EAttendanceRecord.db, hiddenAttendanceRecordID, "AttendanceRecordID"));
        eBinding.add(AttendanceRecordDate);
        eBinding.add(new DropDownVLBinder(EAttendanceRecord.db, RosterCodeID, ERosterCode.VLRosterCode));
        eBinding.add(AttendanceRecordRosterCodeInTimeOverride);
        eBinding.add(AttendanceRecordRosterCodeLunchStartTimeOverride);
        eBinding.add(AttendanceRecordRosterCodeLunchEndTimeOverride);
        eBinding.add(AttendanceRecordRosterCodeOutTimeOverride);
        eBinding.add(AttendanceRecordWorkStart);
        eBinding.add(AttendanceRecordLunchOut);
        eBinding.add(AttendanceRecordLunchIn);
        eBinding.add(AttendanceRecordWorkEnd);
        eBinding.add(AttendanceRecordWorkStartLocation);
        eBinding.add(AttendanceRecordLunchOutLocation);
        eBinding.add(AttendanceRecordLunchInLocation);
        eBinding.add(AttendanceRecordWorkEndLocation);
        eBinding.add(AttendanceRecordActualLateMins);
        eBinding.add(AttendanceRecordWaivedLateMins);

        eBinding.add(AttendanceRecordActualEarlyLeaveMins);
        eBinding.add(AttendanceRecordActualLunchLateMins);
        eBinding.add(AttendanceRecordActualLunchEarlyLeaveMins);
        eBinding.add(AttendanceRecordActualOvertimeMins);
        eBinding.add(AttendanceRecordActualLunchOvertimeMins);
        eBinding.add(AttendanceRecordActualWorkingHour);
        eBinding.add(AttendanceRecordActualWorkingDay);
        eBinding.add(AttendanceRecordActualLunchTimeMins);
        eBinding.add(new CheckBoxBinder(EAttendanceRecord.db, AttendanceRecordIsAbsent));
        eBinding.add(new TextBoxXMLNodeBinder(db, OverrideDailyPayment, "AttendanceRecordExtendData", OverrideDailyPayment.ID));
        eBinding.add(new CheckBoxXMLNodeBinder(db, WorkAsOvertime, "AttendanceRecordExtendData", WorkAsOvertime.ID));
        eBinding.add(new CheckBoxBinder(db, AttendanceRecordWorkOnRestDay));
        eBinding.add(AttendanceRecordRemark);


        eBinding.init(Request, Session);
        WebFormUtils.loadValues(dbConn, RosterClientID, ERosterClient.VLRosterClient, new DBFilter(), null, RosterClientID.SelectedValue, "combobox.notselected");
        RosterClientID.Items.Insert(0, new ListItem("---All---", ROSTER_CLIENT_ALL_ROSTER_CODE));
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read))
        {
            return;
        }


        WebFormUtils.loadValues(dbConn, HLevel1, EHierarchyLevel.VLHierarchy, null, null, HLevel1.SelectedValue, (string)"combobox.notselected");
        WebFormUtils.loadValues(dbConn, HLevel2, EHierarchyLevel.VLHierarchy, null, null, HLevel2.SelectedValue, (string)"combobox.notselected");



        sbinding = new SearchBinding(dbConn, EEmpPersonalInfo.db);
        sbinding.initValues("EmpStatus", null, EEmpPersonalInfo.VLEmpStatus, HROne.Common.WebUtility.GetSessionUICultureInfo(Session));


        info = ListFooter.ListInfo;

        HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls);
    }
Esempio n. 15
0
    // End 0000185, KuangWei, 2015-05-05

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            WebFormUtils.loadValues(dbConn, HLevelID, HROne.Lib.Entities.EHierarchyLevel.VLHierarchy, new DBFilter(), ci, null, null);
            //HLevelID.Items.RemoveAt(0);
        }
        if (HLevelID.Items.Count > 0)
        {
            GroupBy.Items.FindByValue("HLevel").Enabled = true;
        }
        else
        {
            GroupBy.Items.FindByValue("HLevel").Enabled = false;
        }

        if (GroupBy.SelectedValue.Equals("HLevel", StringComparison.CurrentCultureIgnoreCase))
        {
            HLevelID.Visible = true;
        }
        else
        {
            HLevelID.Visible = false;
        }

        if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.Read))
        {
            return;
        }

        // Start 0000185, KuangWei, 2015-05-05
        binding = new SearchBinding(dbConn, db);
        binding.init(DecryptedRequest, null);

        info = ListFooter.ListInfo;
        // End 0000185, KuangWei, 2015-05-05

        HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls);
    }
Esempio n. 16
0
    protected void HierarchyLevel_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        HROne.Common.WebUtility.WebControlsLocalization(Session, e.Item.Controls);

        EHierarchyLevel level = (EHierarchyLevel)e.Item.DataItem;

        Label lblHLevel = (Label)e.Item.FindControl("HLevel");

        lblHLevel.Text = level.HLevelDesc;



        DBFilter filter = new DBFilter();

        filter.add(new Match("HLevelID", level.HLevelID));
        filter.add(new Match("CompanyID", ((HtmlInputHidden)e.Item.Parent.Parent.FindControl("CompanyID")).Value));

        CheckBoxList c        = (CheckBoxList)e.Item.FindControl("HierarchyElementList");
        string       selected = c.SelectedValue;

        WebFormUtils.loadValues(dbConn, c, EHierarchyElement.VLHierarchyElement, filter, ci, null, "combobox.notselected");
        c.Attributes["HLevelID"] = level.HLevelID.ToString();
    }
Esempio n. 17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!WebUtils.CheckAccess(Response, Session, FUNCTION_CODE, WebUtils.AccessLevel.ReadWrite))
        {
            return;
        }
        toolBar.FunctionCode = FUNCTION_CODE;



        binding = new Binding(dbConn, db);
        binding.add(MPFPlanID);
        binding.add(MPFPlanCode);
        binding.add(MPFPlanDesc);

        HROne.ProductLicense productLicense = WebUtils.productLicense(Session);

        DBFilter SchemeFilter = new DBFilter();

        if (productLicense.ProductType != HROne.ProductLicense.ProductLicenseType.HROne)
        {
            HROne.ProductLicense license = WebUtils.productLicense(Session);
            if (!license.HasAutopayMPFFileOthers)
            {
                OR orTrusteeCodeTerms = new OR();
                orTrusteeCodeTerms.add(new Match("MPFSchemeTrusteeCode", "HSBC"));
                orTrusteeCodeTerms.add(new Match("MPFSchemeTrusteeCode", "HangSeng"));
                SchemeFilter.add(orTrusteeCodeTerms);
            }
        }

        {
            string selectedValue = MPFSchemeTrusteeCode.SelectedValue;
            if (selectedValue != null)
            {
                selectedValue = selectedValue.Trim();
            }
            System.Globalization.CultureInfo ci = System.Threading.Thread.CurrentThread.CurrentUICulture;
            WebFormUtils.loadValues(dbConn, MPFSchemeTrusteeCode, EMPFScheme.VLMPFSchemeTrusteeCode, new DBFilter(SchemeFilter), ci, selectedValue, "All");
        }
        if (MPFSchemeTrusteeCode.SelectedIndex != 0)
        {
            SchemeFilter.add(new Match("MPFSchemeTrusteeCode", MPFSchemeTrusteeCode.SelectedValue));
        }
        binding.add(new DropDownVLBinder(db, MPFSchemeID, EMPFScheme.VLMPFScheme, SchemeFilter));
        binding.add(MPFPlanCompanyName);
        binding.add(MPFPlanCompanyAddress);
        binding.add(MPFPlanContactName);
        binding.add(MPFPlanContactNo);
        binding.add(MPFPlanParticipationNo);
        binding.add(new TextBoxXMLNodeBinder(db, MPFPlanPayCenter, "MPFPlanExtendData", MPFPlanPayCenter.ID));
        binding.add(new TextBoxXMLNodeBinder(db, MPFPlanDefaultClassName, "MPFPlanExtendData", MPFPlanDefaultClassName.ID));
        binding.add(new TextBoxXMLNodeBinder(db, MPFPlanEmployerID, "MPFPlanExtendData", MPFPlanEmployerID.ID));
        binding.add(new TextBoxXMLNodeBinder(db, MPFPlanSchemeNo, "MPFPlanExtendData", MPFPlanSchemeNo.ID));
        binding.add(new TextBoxXMLNodeBinder(db, MPFPlanPlanNo, "MPFPlanExtendData", MPFPlanPlanNo.ID));
        binding.add(new TextBoxXMLNodeBinder(db, MPFPlanBOCISequenceNo, "MPFPlanExtendData", MPFPlanBOCISequenceNo.ID));
        binding.add(new TextBoxXMLNodeBinder(db, MPFPlanAIAERPlanNo, "MPFPlanExtendData", MPFPlanAIAERPlanNo.ID));
        binding.add(new DropDownListXMLNodeVLBinder(db, MPFPlanAIAPayFrequency, EPayrollGroup.VLPayGroupFreq, null, "MPFPlanExtendData", MPFPlanAIAPayFrequency.ID));
        binding.add(new TextBoxXMLNodeBinder(db, MPFPlanManulifeSubSchemeNo, "MPFPlanExtendData", HROne.MPFFile.ManulifeMPFFile.MPF_PLAN_XML_SUB_SCHEME_NO));
        binding.add(new TextBoxXMLNodeBinder(db, MPFPlanManulifeGroupNo, "MPFPlanExtendData", HROne.MPFFile.ManulifeMPFFile.MPF_PLAN_XML_GROUP_NO));
        binding.add(new TextBoxXMLNodeBinder(db, MPFPlanManulifeSubGroupNo, "MPFPlanExtendData", HROne.MPFFile.ManulifeMPFFile.MPF_PLAN_XML_SUB_GROUP_NO));

        binding.add(new DropDownVLBinder(db, MPFPlanEmployerRoundingRule, Values.VLRoundingRule));
        binding.add(new DropDownVLBinder(db, MPFPlanEmployerDecimalPlace, Values.VLDecimalPlace));
        binding.add(new DropDownVLBinder(db, MPFPlanEmployeeRoundingRule, Values.VLRoundingRule));
        binding.add(new DropDownVLBinder(db, MPFPlanEmployeeDecimalPlace, Values.VLDecimalPlace));

        binding.init(Request, Session);

        if (!int.TryParse(DecryptedRequest["MPFPlanID"], out CurID))
        {
            CurID = -1;
        }

        HROne.Common.WebUtility.WebControlsLocalization(this, this.Controls);

        if (!Page.IsPostBack)
        {
            if (CurID > 0)
            {
                loadObject();
            }
            else
            {
                toolBar.DeleteButton_Visible = false;
            }
        }
    }
Esempio n. 18
0
        protected void PopulateEditForm()
        {
            WebFormUtils.loadValues(dbConn, RosterClientID, ERosterClient.VLRosterClient, new DBFilter());

            object dbObjectItem = HROne.Lib.Attendance.DataSource.RosterTableEvent.IDToDBObject(dbConn, Appointment.ID);

            if (dbObjectItem is ERosterTable)
            {
                ERosterTable rosterTable = (ERosterTable)dbObjectItem;
                Hashtable    values      = new Hashtable();
                ERosterTable.db.populate(rosterTable, values);

                Binding ebinding = new Binding(dbConn, ERosterTable.db);
                ebinding.add(RosterTableID);
                ebinding.add(EmpID);
                ebinding.add(RosterTableDate);
                ebinding.add(RosterTableOverrideInTime);
                ebinding.add(RosterTableOverrideOutTime);

                if (values["RosterCodeID"].Equals("0"))
                {
                    values.Remove("RosterCodeID");
                }
                else
                {
                    ebinding.add(new DropDownVLBinder(ERosterTable.db, RosterCodeID, ERosterCode.VLRosterCode));
                }
                ebinding.init(Request, Session);
                ebinding.toControl(values);
                EEmpPersonalInfo empInfo = new EEmpPersonalInfo();
                empInfo.EmpID = rosterTable.EmpID;
                if (EEmpPersonalInfo.db.select(dbConn, empInfo))
                {
                    EmpNo.Text   = empInfo.EmpNo;
                    EmpName.Text = empInfo.EmpEngFullNameWithAlias;
                }
                else
                {
                    EmpNo.Text   = string.Empty;
                    EmpName.Text = string.Empty;
                }
                ERosterCode rosterCode = new ERosterCode();
                rosterCode.RosterCodeID = rosterTable.RosterCodeID;
                ERosterCode.db.select(dbConn, rosterCode);
                if (rosterCode.RosterClientID > 0)
                {
                    RosterClientID.SelectedValue = rosterCode.RosterClientID.ToString();
                }

                RefreshClientSite(rosterCode.RosterClientID);

                if (rosterCode.RosterClientSiteID > 0)
                {
                    RosterClientSiteID.SelectedValue = rosterCode.RosterClientSiteID.ToString();
                }

                RefreshRosterCode(rosterCode.RosterClientSiteID);

                if (rosterTable.RosterTableOverrideInTime.Ticks.Equals(0))
                {
                    RosterTableOverrideInTime.Text = string.Empty;
                }
                if (rosterTable.RosterTableOverrideOutTime.Ticks.Equals(0))
                {
                    RosterTableOverrideOutTime.Text = string.Empty;
                }

                RefreshRosterTableInOutTime(rosterTable.RosterCodeID, false);
            }

            //if (item_ID != null)
            //{
            //    string[] id_Array = item_ID.ToString().Split(new char[] { '_' });

            //    if (id_Array.GetLength(0) == 2)
            //    {
            //        if (id_Array[0].Equals("RosterTable"))
            //        {
            //            ERosterTable rosterTable = new ERosterTable();
            //            rosterTable.RosterTableID = int.Parse(id_Array[1]);
            //            if (ERosterTable.db.select(rosterTable))
            //            {
            //                Binding ebinding = new Binding(ERosterTable.db);
            //                ebinding.add(RosterTableID);
            //                ebinding.add(EmpID);
            //                ebinding.add(RosterTableDate);
            //                ebinding.add(new DropDownVLBinder(ERosterTable.db, RosterCodeID, ERosterCode.VLRosterCode));
            //                ebinding.init(Request, Session);
            //                Hashtable values = new Hashtable();
            //                ERosterTable.db.populate(rosterTable, values);
            //                ebinding.toControl(values);

            //                EEmpPersonalInfo empInfo = new EEmpPersonalInfo();
            //                empInfo.EmpID = rosterTable.EmpID;
            //                if (EEmpPersonalInfo.db.select(empInfo))
            //                    EmpName.Text = empInfo.EmpEngFullNameWithAlias;
            //                else
            //                    EmpName.Text = string.Empty;

            //            }

            //            ERosterCode rosterCode = new ERosterCode();
            //            rosterCode.RosterCodeID = rosterTable.RosterCodeID;
            //            ERosterCode.db.select(rosterCode);
            //            if (rosterCode.RosterClientID > 0)
            //                RosterClientID.SelectedValue = rosterCode.RosterClientID.ToString();



            //            RefreshClientSite(rosterCode.RosterClientID);

            //            if (rosterCode.RosterClientSiteID > 0)
            //                RosterClientSiteID.SelectedValue = rosterCode.RosterClientSiteID.ToString();

            //            RefreshRosterCode(rosterCode.RosterClientSiteID);
            //        }
            //    }
            //}
        }