Beispiel #1
0
        public AreaForm(FormTypes type, string areaID)
        {
            InitializeComponent();

            InitParas();

            FormType = type;
            if (string.IsNullOrEmpty(areaID))
            {
                area = new T_HR_AREADIFFERENCE();
                area.AREADIFFERENCEID = Guid.NewGuid().ToString();
                area.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                area.CREATEDATE = System.DateTime.Now;

                area.UPDATEDATE = System.DateTime.Now;
                area.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;

                this.DataContext = area;
            }
            else
            {
                client.GetAreaCategoryByIDAsync(areaID);
            }

        }
Beispiel #2
0
        private void lkArea_FindClick(object sender, EventArgs e)
        {
            Dictionary <string, string> cols = new Dictionary <string, string>();

            cols.Add("AREACATEGORY", "AREACATEGORY");
            // cols.Add("SALARYLEVEL", "SALARYLEVEL");


            LookupForm lookup = new LookupForm(EntityNames.AreaCategory,
                                               typeof(List <T_HR_AREADIFFERENCE>), cols);

            //Dictionary<string, string> cols = new Dictionary<string, string>();
            //cols.Add("SALARYSYSTEMNAME", "SALARYSYSTEMNAME");
            //// cols.Add("SALARYLEVEL", "SALARYLEVEL");


            //LookupForm lookup = new LookupForm(EntityNames.SalarySystem,
            //   typeof(List<T_HR_SALARYSYSTEM>), cols);

            lookup.SelectedClick += (o, ev) =>
            {
                T_HR_AREADIFFERENCE ent = lookup.SelectedObj as T_HR_AREADIFFERENCE;
                if (ent != null)
                {
                    lkArea.DataContext = ent;
                    SalarySolution.T_HR_AREADIFFERENCE = ent;
                    //SalarySolution.T_HR_SALARYLEVEL.SALARYLEVELID = ent.SALARYLEVELID;
                }
            };

            lookup.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
        }
Beispiel #3
0
 /// <summary>
 /// 获取地区
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void client_GetAreaWithPagingCompleted(object sender, GetAreaWithPagingCompletedEventArgs e)
 {
     if (e.Error != null)
     {
         ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
         return;
     }
     else
     {
         if (e.Result != null)
         {
             DtGridArea.ItemsSource  = e.Result;
             areaDifference          = e.Result.ToList();
             dataPagerArea.PageCount = e.pageCount;
             currentArea             = e.Result[0];
             LoadCity();
         }
     }
 }
Beispiel #4
0
        public AreaSortForm(FormTypes type, string areaID)
        {
            InitializeComponent();
            InitParas();
            this.areaID = areaID;
            FormType    = type;
            if (string.IsNullOrEmpty(areaID))
            {
                area = new T_HR_AREADIFFERENCE();
                area.AREADIFFERENCEID = Guid.NewGuid().ToString();
                area.CREATEUSERID     = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                area.CREATEDATE       = System.DateTime.Now;

                area.UPDATEDATE   = System.DateTime.Now;
                area.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;

                this.DataContext = area;
            }
            else
            {
                client.GetAreaCategoryByIDAsync(areaID);
            }
        }
Beispiel #5
0
 public string AreaCategoryADD(T_HR_AREADIFFERENCE obj)
 {
     using (AreaCategoryBLL bll = new AreaCategoryBLL())
     {
         return bll.AreaCategoryADD(obj);
     }
 }
Beispiel #6
0
 public void AreaCategoryUpdate(T_HR_AREADIFFERENCE obj)
 {
     using (AreaCategoryBLL bll = new AreaCategoryBLL())
     {
         bll.AreaCategoryUpdate(obj);
     }
 }
Beispiel #7
0
 private void btEdit_Click(object sender, RoutedEventArgs e)
 {
     if (DtGrid.SelectedItems.Count > 0)
     {
         this.selectedAreaDifference = (DtGrid.SelectedItems[0] as T_HR_AREAALLOWANCE).T_HR_AREADIFFERENCE;
         Form.Salary.AreaAllowanceForm form = new SMT.HRM.UI.Form.Salary.AreaAllowanceForm(FormTypes.Edit, (DtGrid.SelectedItems[0] as T_HR_AREAALLOWANCE).AREAALLOWANCEID, AreaID, (DtGrid.SelectedItems[0] as T_HR_AREAALLOWANCE).POSTLEVEL);
         EntityBrowser browser = new EntityBrowser(form);
         form.MinHeight = 150;
         form.MinWidth = 410;
         browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
         browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
     }
     else
     {
         Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "EDIT"));
         return;
     }
 }
Beispiel #8
0
        private void DtGridArea_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (DtGridArea.SelectedItems.Count > 0)
            {
                currentArea = DtGridArea.SelectedItems[0] as T_HR_AREADIFFERENCE;
                AreaID = currentArea.AREADIFFERENCEID;
                client.GetAreaAllowanceByAreaIDAsync(AreaID);
            }


        }
Beispiel #9
0
        private void DtGridArea_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (DtGridArea.SelectedItems.Count > 0)
            {
                currentArea = DtGridArea.SelectedItems[0] as T_HR_AREADIFFERENCE;
                AreaID = currentArea.AREADIFFERENCEID;
                LoadCity();
            }


        }
Beispiel #10
0
 /// <summary>
 /// 获取地区
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void client_GetAreaWithPagingCompleted(object sender, GetAreaWithPagingCompletedEventArgs e)
 {
     if (e.Error != null)
     {
         ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"),Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
         return;
     }
     else
     {
         if (e.Result != null)
         {
             DtGridArea.ItemsSource = e.Result;
             areaDifference = e.Result.ToList();
             dataPagerArea.PageCount = e.pageCount;
             currentArea = e.Result[0];
             LoadCity();
         }
     }
 }