Example #1
0
        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            List <SMT.SaaS.FrameworkUI.Validator.ValidatorBase> validators = Group1.ValidateAll();

            if (validators.Count > 0)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), validators.Count.ToString() + " invalid validators");
            }
            else
            {
                if (FormType == SMT.SaaS.FrameworkUI.FormTypes.New)
                {
                    RelationPost.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                    RelationPost.CREATEDATE   = DateTime.Now;
                    RelationPost.T_HR_POST    = Post;
                    client.RelationPostAddAsync(RelationPost);
                }
                else
                {
                    RelationPost.UPDATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                    RelationPost.UPDATEDATE   = DateTime.Now;
                    client.RelationPostUpdateAsync(RelationPost);
                }
            }
        }