protected override void Save()
        {
            System.Text.StringBuilder Sb_ErrorMsg = new System.Text.StringBuilder();
            if (!this.Save_Validation(ref Sb_ErrorMsg))
            {
                this.Show_EventMsg(Sb_ErrorMsg.ToString(), ClsBaseMasterDetails.eStatus.Event_Error);
                return;
            }

            //[-]

            this.mObj.pDr_RowProperty["Code"]      = this.Txt_EmployeeCode.Text;
            this.mObj.pDr["Leave_Vacation"]        = Do_Methods.Convert_Int32(this.Txt_LeaveSick.Text);
            this.mObj.pDr["Leave_Sick"]            = Do_Methods.Convert_Int32(this.Txt_LeaveSick.Text);
            this.mObj.pDr["Leave_Bereavement"]     = Do_Methods.Convert_Int32(this.Txt_LeaveBereavement.Text);
            this.mObj.pDr["Position"]              = this.Txt_Position.Text;
            this.mObj.pDr["LookupID_Department"]   = Do_Methods.Convert_Int64(this.Cbo_Department.SelectedValue);
            this.mObj.pDr["LookupID_PayRate"]      = Do_Methods.Convert_Int64(this.Cbo_PayRate.SelectedValue);
            this.mObj.pDr["LookupID_EmployeeType"] = Do_Methods.Convert_Int64(this.Cbo_EmployeeType.SelectedValue);
            this.mObj.pDr["SIN"] = this.Txt_SIN.Text;
            this.mObj.pDr["Pay"] = Do_Methods.Convert_Double(this.Txt_Pay.Text);

            this.UcPerson.Update();
            this.UcAddress.Update();

            Do_Methods.ConvertCaps(this.mObj.pDr_RowProperty);
            Do_Methods.ConvertCaps(this.mObj.pDr_Person);
            Do_Methods.ConvertCaps(this.mObj.pDr);

            //[-]

            base.Save();
        }
Esempio n. 2
0
        public override void RebindGrid()
        {
            Int64 Top = 0;

            try { Top = Do_Methods.Convert_Int64(this.Txt_Top.Text); }
            catch { }

            Int32 Page = 0;

            try { Page = Do_Methods.Convert_Int32(this.Cbo_Page.SelectedValue); }
            catch { }

            string ViewState_DisplayFilterString = (string)this.ViewState[CnsDisplayFilterString];
            string ViewState_DisplayOrderString  = (string)this.ViewState[CnsDisplayOrderString];

            string ViewState_OrderString = (string)this.ViewState[CnsOrderString];

            QueryCondition Qc = null;

            try { Qc = (QueryCondition)this.ViewState[CnsObj_QueryCondition]; }
            catch { }

            if (Qc == null)
            {
                Qc = new QueryCondition();
            }

            this.Details_SetPaginator(Top, this.List_Count(Qc));

            try
            { this.Cbo_Page.SelectedValue = Page.ToString(); }
            catch
            {
                try
                { Page = Convert.ToInt32(this.Cbo_Page.SelectedValue); }
                catch { }
            }

            DataTable Dt;

            try
            { Dt = this.List(Qc, ViewState_OrderString, Top, Page); }
            catch
            {
                Dt = this.List(Qc, "", Top, Page);
                ViewState_OrderString                 = "";
                ViewState_DisplayOrderString          = "";
                this.ViewState[CnsOrderString]        = ViewState_OrderString;
                this.ViewState[CnsDisplayOrderString] = ViewState_DisplayOrderString;
            }

            this.BindGrid(Dt);

            try
            { this.EOCbp_Grid.Update(); }
            catch { }
        }