Esempio n. 1
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            var validate = Validation.Validate(this, "b");

            if (validate != "")
            {
                UCModalError1.ShowMessageError = validate;
                UCModalError1.ShowModalError();
            }
            else
            {
                DTO.GroupSubject group = new DTO.GroupSubject();
                group.ID         = HID.Value.ToDecimal();
                group.GROUP_NAME = txtUpdateGroupName.Text;
                group.EXAM_PASS  = txtUpdatePass.Text.ToDecimal();
                group.STATUS     = "A";
                var res = biz.UpdateSubjectGroup(group);
                if (res.ErrorMsg == null)
                {
                    BindGrid();
                    UCModalSuccess1.ShowMessageSuccess = "แก้ไขข้อมูลสำเร็จ";
                    UCModalSuccess1.ShowModalSuccess();
                }
                else
                {
                    UCModalError1.ShowMessageError = "แก้ไขข้อมูลไม่สำเร็จ";
                    UCModalError1.ShowModalError();
                }
            }
        }
Esempio n. 2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            var validate = Validation.Validate(this, "a");

            if (validate != "")
            {
                UCModalError1.ShowMessageError = validate;
                UCModalError1.ShowModalError();
            }
            else
            {
                DTO.GroupSubject group = new DTO.GroupSubject();
                group.GROUP_NAME = txtGroupName.Text.Trim();
                group.EXAM_PASS  = txtExamPass.Text.ToDecimal();

                var res = biz.AddSubjectGroup(group);
                if (res.ErrorMsg == null)
                {
                    txtExamPass.Text  = string.Empty;
                    txtGroupName.Text = string.Empty;
                    BindGrid();
                    UCModalSuccess1.ShowMessageSuccess = "บันทีกข้อมูลสำเร็จ";
                    UCModalSuccess1.ShowModalSuccess();
                }
                else
                {
                    UCModalError1.ShowMessageError = res.ErrorMsg;
                    UCModalError1.ShowModalError();
                }
            }
        }
Esempio n. 3
0
 public DTO.ResponseService <string> UpdateSubjectGroup(DTO.GroupSubject examgroup)
 {
     return(svc.UpdateSubjectGroup(examgroup));
 }