Example #1
0
        public DTO.ResponseService <DTO.RegistrationAttatchFile> InsertAttachFileToRegistration
            (DTO.Registration registration, DTO.RegistrationAttatchFile registrationAttachFile)
        {
            DTO.ResponseService <DTO.RegistrationAttatchFile> response = svc.InsertAttachFileToRegistration(registration.ID, registrationAttachFile);

            return(response);
        }
        public void InsertWithAttatchFileTest()
        {
            RegistationService target = new RegistationService(); // TODO: Initialize to an appropriate value

            //RegistrationType registerType = new RegistrationType(); // TODO: Initialize to an appropriate value
            DTO.Registration x = new DTO.Registration(); // TODO: Initialize to an appropriate value
            x.ID             = DateTime.Now.Year.ToString("0000").Substring(2, 2) + DateTime.Now.ToString("MMddHHmmssfff");
            x.ID_CARD_NO     = "3100800728835";
            x.BIRTH_DATE     = DateTime.Now.AddYears(-21);
            x.MEMBER_TYPE    = "1";
            x.PRE_NAME_CODE  = "3";
            x.NAMES          = "ชินบุตร";
            x.LASTNAME       = "สุวรรณเลิศวัฒนา";
            x.NATIONALITY    = "001";
            x.SEX            = "M";
            x.EDUCATION_CODE = "05";
            x.EMAIL          = "*****@*****.**";
            x.IMPORT_STATUS  = "N";

            List <RegistrationAttatchFile> listAttatchFile = new List <RegistrationAttatchFile>(); // TODO: Initialize to an appropriate value
            //listAttatchFile.Add(new RegistrationAttatchFile
            //{


            //});

            ResponseService <DTO.Registration> expected = null; // TODO: Initialize to an appropriate value
            ResponseService <DTO.Registration> actual;


            actual = target.InsertWithAttatchFile(DTO.RegistrationType.General, x, listAttatchFile);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
Example #3
0
 private void GetRegistration()
 {
     DTO.Registration res = MasterPage.GetLastRegistration();
     if (res != null)
     {
         GetLoadDataToControl(res);
     }
 }
Example #4
0
        public static object Register(DTO.Registration registration)
        {
            registration.RegistrationId = Guid.NewGuid();
            registration.RegisteredOn   = DateTimeOffset.UtcNow;

            Factory.Insert(AppUsers.GetTenant(), registration, "account.registrations", "registration_id", false);

            return(registration.RegistrationId);
        }
Example #5
0
        private void GetLoadDataToControl(DTO.Registration general)
        {
            //var attachFiles = this.AttachFiles;
            //var personAttachFiles = this.PersonAttachFiles;
            MasterPage.RegistrationId = general.ID;
            if (general.MEMBER_TYPE != ((int)DTO.MemberType.General).ToString())
            {
                MasterPage.ModelError.ShowMessageError = SysMessage.UserMissMatchRegitrationData;
                MasterPage.ModelError.ShowModalError();
            }

            txtIDNumber.Text = general.ID_CARD_NO;
            //ddlTitle.SelectedValue = general.PRE_NAME_CODE;
            ddlTitle.SelectedValue       = (general.PRE_NAME_CODE == null) ? "" : Convert.ToString(Convert.ToInt32(general.PRE_NAME_CODE));
            txtFirstName.Text            = general.NAMES;
            txtLastName.Text             = general.LASTNAME;
            txtIDNumber.Text             = general.ID_CARD_NO;
            txtBirthDay.Text             = (general.BIRTH_DATE == null) ? "" : ((DateTime)general.BIRTH_DATE).ToString("dd/MM/yyyy");
            rblSex.SelectedValue         = general.SEX;
            ddlNationality.SelectedValue = general.NATIONALITY;
            ddlEducation.SelectedValue   = general.EDUCATION_CODE;
            txtEmail.Text  = general.EMAIL;
            txtTel.Text    = LocalTelephoneNumberHelper.GetPhoneNumber(general.LOCAL_TELEPHONE);
            txtTelExt.Text = LocalTelephoneNumberHelper.GetExtenNumber(general.LOCAL_TELEPHONE);

            txtMobilePhone.Text = general.TELEPHONE;

            ucAddressCurrent.Address = general.ADDRESS_1;       // txtCurrentAddress.Text;
            ucAddressCurrent.SelectDropDownStep(general.PROVINCE_CODE, general.AREA_CODE, general.TUMBON_CODE);
            ucAddressCurrent.PostCode = general.ZIP_CODE;       // txtPostcodeCurrentAddress.Text;

            ucAddressRegister.Address = general.LOCAL_ADDRESS1; // txtRegisterAddress.Text;
            ucAddressRegister.SelectDropDownStep(general.LOCAL_PROVINCE_CODE, general.LOCAL_AREA_CODE, general.LOCAL_TUMBON_CODE);
            ucAddressRegister.PostCode = general.LOCAL_ZIPCODE; // txtPostcodeRegisterAddress.Text;


            //if ((general.AGENT_TYPE != "") && (general.AGENT_TYPE != null))
            //{
            //    ddlAgentType.SelectedValue = general.AGENT_TYPE;
            //}
            //else if ((general.AGENT_TYPE == "") || (general.AGENT_TYPE == null))
            //{
            //    ListItem ddlList = new ListItem("กรุณาเลือกประเภทตัวแทนสมาชิก", "", true);
            //    ddlList.Selected = true;
            //    ddlAgentType.Items.Add(ddlList);

            //}

            //general.CREATED_BY = "agdoi";
            //general.CREATED_DATE = DateTime.Now;
            //general.UPDATED_BY = "agdoi";
            //general.UPDATED_DATE = DateTime.Now;
            //general.REG_PASS = MasterPage.Password;
        }
Example #6
0
        private void GetLoadDataToControl(DTO.Registration asscoent)
        {
            BLL.DataCenterBiz dcbiz      = new BLL.DataCenterBiz();
            BLL.PersonBiz     biz        = new BLL.PersonBiz();
            BLL.DataCenterBiz dataCenter = new BLL.DataCenterBiz();

            var res = biz.GetUserProfileById(this.MasterPage.UserProfile.Id);

            this.MasterPage.AttachFileControl.RegisterationId = this.MasterPage.UserProfile.Id;
            this.MasterPage.AttachFileControl.CurrentUser     = this.UserProfile.LoginName;

            this.MasterPage.RegistrationId = asscoent.ID;

            if (!asscoent.MEMBER_TYPE.Equals(DTO.MemberType.Association.GetEnumValue().ToString()))
            {
                MasterPage.ModelError.ShowMessageError = SysMessage.UserMissMatchRegitrationData;
                MasterPage.ModelError.ShowModalError();
            }

            txtAssociationRegister.Text = asscoent.COMP_CODE;
            ddlTitle.SelectedValue      = asscoent.PRE_NAME_CODE;
            txtFirstName.Text           = asscoent.NAMES;
            txtLastName.Text            = asscoent.LASTNAME;
            txtIDCard.Text            = asscoent.ID_CARD_NO;
            txtIDCard.Enabled         = false;
            rblSex.Text               = asscoent.SEX;
            txtAssociationTel.Text    = LocalTelephoneNumberHelper.GetPhoneNumber(asscoent.LOCAL_TELEPHONE);
            txtAssociationTelExt.Text = LocalTelephoneNumberHelper.GetExtenNumber(asscoent.LOCAL_TELEPHONE);
            txtTel.Text               = LocalTelephoneNumberHelper.GetPhoneNumber(asscoent.TELEPHONE);
            txtTelExt.Text            = LocalTelephoneNumberHelper.GetExtenNumber(asscoent.TELEPHONE);


            txtEmail.Text    = asscoent.EMAIL;
            txtEmail.Enabled = false;
            UcAddress.TextBoxAddress.Text  = asscoent.ADDRESS_1;
            UcAddress.TextBoxPostCode.Text = asscoent.ZIP_CODE;

            //var strName = dcbiz.GetAssociateNameById(asscoent.COMP_CODE);
            DTO.ResponseService <DTO.ASSOCIATION> strName = dcbiz.GetInsuranceAssociateNameByID(asscoent.COMP_CODE);
            if (strName.DataResponse != null)
            {
                txtAssociation.Text = strName.DataResponse.ASSOCIATION_NAME + " " + "[" + asscoent.COMP_CODE + "]";
            }
            else
            {
                txtAssociation.Text = "Name[Null]" + " " + "[" + asscoent.COMP_CODE + "]";
            }

            this.MasterPage.TextBoxResultReg.Text = asscoent.APPROVE_RESULT;

            UcAddress.SelectDropDownStep(asscoent.PROVINCE_CODE, asscoent.AREA_CODE, asscoent.TUMBON_CODE);
        }
Example #7
0
        public void ValidateBeforeSubmitTest()
        {
            IRegistrationService target       = CreateIRegistrationService(); // TODO: Initialize to an appropriate value
            RegistrationType     registerType = new RegistrationType();       // TODO: Initialize to an appropriate value

            DTO.Registration       entity   = null;                           // TODO: Initialize to an appropriate value
            ResponseMessage <bool> expected = null;                           // TODO: Initialize to an appropriate value
            ResponseMessage <bool> actual;

            actual = target.ValidateBeforeSubmit(registerType, entity);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
Example #8
0
        public void UpdateWithAttachFilesTest()
        {
            IRegistrationService target = CreateIRegistrationService(); // TODO: Initialize to an appropriate value

            DTO.Registration entity = null;                             // TODO: Initialize to an appropriate value
            List <RegistrationAttatchFile>     listAttatchFile = null;  // TODO: Initialize to an appropriate value
            ResponseService <DTO.Registration> expected        = null;  // TODO: Initialize to an appropriate value
            ResponseService <DTO.Registration> actual;

            actual = target.UpdateWithAttachFiles(entity, listAttatchFile);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
Example #9
0
        public void InsertTest()
        {
            IRegistrationService target = CreateIRegistrationService(); // TODO: Initialize to an appropriate value

            DTO.Registration entity       = null;                       // TODO: Initialize to an appropriate value
            RegistrationType registerType = new RegistrationType();     // TODO: Initialize to an appropriate value
            ResponseService <DTO.Registration> expected = null;         // TODO: Initialize to an appropriate value
            ResponseService <DTO.Registration> actual;

            actual = target.Insert(entity, registerType);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
Example #10
0
 private void InitOnTargetViewMode()
 {
     DTO.Registration res = MasterPage.GetRegistration();
     if (res != null)
     {
         GetLoadDataToControl(res);
         //Status 1 = รออนุมัติ(สมัคร), Status 3 = ไม่อนุมัติ(สมัคร)
         if (!res.STATUS.Equals("1") && !res.STATUS.Equals("3"))
         {
             this.MasterPage.ShowApproveResultPerson();
         }
     }
     EnableControl(false);
     StatusInit();
 }
Example #11
0
        public static IRegistration ConvertToPersonRegisteration(this DTO.Registration registeration)
        {
            DateTime createdate = (registeration.CREATED_DATE == null)?DateTime.MinValue: (DateTime)registeration.CREATED_DATE;
            DateTime birth_date = (registeration.BIRTH_DATE == null) ? DateTime.MinValue : (DateTime)registeration.BIRTH_DATE;
            DateTime updatedate = (registeration.UPDATED_DATE == null) ? DateTime.MinValue : (DateTime)registeration.UPDATED_DATE;

            IRegistration personRegis = new GeneralRegistration()
            {
                ID                  = registeration.ID,
                MEMBER_TYPE         = registeration.MEMBER_TYPE,
                ID_CARD_NO          = registeration.ID_CARD_NO,
                EMPLOYEE_NO         = registeration.EMPLOYEE_NO,
                PRE_NAME_CODE       = registeration.PRE_NAME_CODE,
                NAMES               = registeration.NAMES,
                LASTNAME            = registeration.LASTNAME,
                NATIONALITY         = registeration.NATIONALITY,
                BIRTH_DATE          = birth_date,
                SEX                 = registeration.SEX,
                EDUCATION_CODE      = registeration.EDUCATION_CODE,
                ADDRESS_1           = registeration.ADDRESS_1,
                ADDRESS_2           = registeration.ADDRESS_2,
                AREA_CODE           = registeration.AREA_CODE,
                PROVINCE_CODE       = registeration.PROVINCE_CODE,
                ZIP_CODE            = registeration.ZIP_CODE,
                TELEPHONE           = registeration.TELEPHONE,
                LOCAL_ADDRESS1      = registeration.LOCAL_ADDRESS1,
                LOCAL_ADDRESS2      = registeration.LOCAL_ADDRESS2,
                LOCAL_AREA_CODE     = registeration.LOCAL_AREA_CODE,
                LOCAL_PROVINCE_CODE = registeration.LOCAL_PROVINCE_CODE,
                LOCAL_ZIPCODE       = registeration.LOCAL_ZIPCODE,
                LOCAL_TELEPHONE     = registeration.LOCAL_TELEPHONE,
                EMAIL               = registeration.EMAIL,
                STATUS              = registeration.STATUS,
                TUMBON_CODE         = registeration.TUMBON_CODE,
                LOCAL_TUMBON_CODE   = registeration.LOCAL_TUMBON_CODE,
                COMP_CODE           = registeration.COMP_CODE,
                CREATED_BY          = registeration.CREATED_BY,
                CREATED_DATE        = createdate,
                UPDATED_BY          = registeration.UPDATED_BY,
                UPDATED_DATE        = updatedate,
                NOT_APPROVE_DATE    = registeration.NOT_APPROVE_DATE,
                LINK_REDIRECT       = registeration.LINK_REDIRECT
                                      //,
                                      //REG_PASS=registeration.REG_PASS,
            };

            return(personRegis);
        }
Example #12
0
        public void UpdateTest()
        {
            IRegistrationService target = CreateIRegistrationService(); // TODO: Initialize to an appropriate value

            String id = OracleDB.GetGenAutoId();
            AG_IAS_REGISTRATION_T regis1 = new AG_IAS_REGISTRATION_T()
            {
                ID         = id,
                ID_CARD_NO = "1236277389234",
                NAMES      = "MyName",
                LASTNAME   = "LastName"
            };

            ctx.AG_IAS_REGISTRATION_T.AddObject(regis1);


            DTO.Registration entity = new DTO.Registration()
            {
                ID         = id,
                ID_CARD_NO = "1234567890123",
                NAMES      = "NewName",
                LASTNAME   = "LastName"
            };                                                                                      // TODO: Initialize to an appropriate value

            ResponseService <DTO.Registration> expected = new ResponseService <DTO.Registration>(); // TODO: Initialize to an appropriate value

            expected.DataResponse = new DTO.Registration()
            {
                ID         = id,
                ID_CARD_NO = "1234567890123",
                NAMES      = "NewName",
                LASTNAME   = "LastName"
            };

            ResponseService <DTO.Registration> actual;

            actual = target.Update(entity);

            Assert.AreEqual(expected.DataResponse.ID, actual.DataResponse.ID);
            Assert.AreEqual(expected.DataResponse.ID_CARD_NO, actual.DataResponse.ID_CARD_NO);
            Assert.AreEqual(expected.DataResponse.NAMES, actual.DataResponse.NAMES);
            Assert.AreEqual(expected.DataResponse.LASTNAME, actual.DataResponse.LASTNAME);
            Assert.AreNotEqual(expected.DataResponse.UPDATED_DATE, actual.DataResponse.UPDATED_DATE);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }
Example #13
0
        public DTO.ResponseService <DTO.Registration> InsertWithAttatchFile(DTO.RegistrationType regType,
                                                                            DTO.Registration ent,
                                                                            List <DTO.RegistrationAttatchFile> listAttatchFile)
        {
            if (ent.REG_PASS == null)
            {
                throw new ApplicationException(Resources.errorRegistrationBiz_001);
            }

            String pass = Utils.EncryptSHA256.Encrypt(ent.REG_PASS);

            ent.REG_PASS = pass;

            DTO.ResponseService <DTO.Registration> res = svc.InsertWithAttatchFile(regType, ent, listAttatchFile.ToArray());


            return(res);
        }
        public void GetPersonalDetailByIDCard()
        {
            RegistationService target       = new RegistationService();                         // TODO: Initialize to an appropriate value
            RegistrationType   registerType = new RegistrationType();                           // TODO: Initialize to an appropriate value

            DTO.Registration entity = new DTO.Registration();                                   // TODO: Initialize to an appropriate value
            DTO.ResponseService <DTO.Person> expected = new DTO.ResponseService <DTO.Person>(); // TODO: Initialize to an appropriate value

            DTO.ResponseService <DTO.Person> actual;

            entity.ID_CARD_NO  = "6992298475033";
            entity.MEMBER_TYPE = ((int)DTO.MemberType.Insurance).ToString();
            entity.NAMES       = "กกดกเ";
            entity.LASTNAME    = "ddddddd";
            entity.EMAIL       = "*****@*****.**";
            actual             = target.GetPersonalDetailByIDCard("5210280819012");
            Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }
Example #15
0
        private void GetLoadDataToControl(DTO.Registration companyent)
        {
            BLL.DataCenterBiz dcbiz      = new BLL.DataCenterBiz();
            BLL.PersonBiz     biz        = new BLL.PersonBiz();
            BLL.DataCenterBiz dataCenter = new BLL.DataCenterBiz();

            var res = biz.GetUserProfileById(this.MasterPage.UserProfile.Id);

            this.MasterPage.AttachFileControl.RegisterationId = this.MasterPage.UserProfile.Id;
            this.MasterPage.AttachFileControl.CurrentUser     = this.UserProfile.LoginName;

            this.MasterPage.RegistrationId = companyent.ID;

            if (!companyent.MEMBER_TYPE.Equals(DTO.MemberType.Insurance.GetEnumValue().ToString()))
            {
                MasterPage.ModelError.ShowMessageError = SysMessage.UserMissMatchRegitrationData;
                MasterPage.ModelError.ShowModalError();
            }
            rblSex.SelectedValue    = companyent.SEX;//milk
            txtCompanyRegister.Text = companyent.COMP_CODE;
            ddlTitle.SelectedValue  = companyent.PRE_NAME_CODE;
            txtFirstName.Text       = companyent.NAMES;
            txtLastName.Text        = companyent.LASTNAME;
            txtIDNumber.Text        = companyent.ID_CARD_NO;
            txtIDNumber.Enabled     = false;
            txtCompanyTel.Text      = LocalTelephoneNumberHelper.GetPhoneNumber(companyent.LOCAL_TELEPHONE);
            txtCompanyTelExt.Text   = LocalTelephoneNumberHelper.GetExtenNumber(companyent.LOCAL_TELEPHONE);
            txtTel.Text             = LocalTelephoneNumberHelper.GetPhoneNumber(companyent.TELEPHONE);
            txtTelExt.Text          = LocalTelephoneNumberHelper.GetExtenNumber(companyent.TELEPHONE);

            txtEmail.Text    = companyent.EMAIL;
            txtEmail.Enabled = false;
            UcAddress.TextBoxAddress.Text  = companyent.ADDRESS_1;
            UcAddress.TextBoxPostCode.Text = companyent.ZIP_CODE;

            var strName = dcbiz.GetCompanyNameById(companyent.COMP_CODE);

            txtCompany.Text = strName;
            this.MasterPage.TextBoxResultReg.Text = companyent.APPROVE_RESULT;

            UcAddress.SelectDropDownStep(companyent.PROVINCE_CODE, companyent.AREA_CODE, companyent.TUMBON_CODE);
        }
        public void EntityValidationTest()
        {
            RegistationService target       = new RegistationService();     // TODO: Initialize to an appropriate value
            RegistrationType   registerType = new RegistrationType();       // TODO: Initialize to an appropriate value

            DTO.Registration       entity   = new DTO.Registration();       // TODO: Initialize to an appropriate value
            ResponseMessage <bool> expected = new ResponseMessage <bool>(); // TODO: Initialize to an appropriate value

            expected.ResultMessage = true;
            ResponseMessage <bool> actual;

            entity.ID_CARD_NO  = "0065322327231";
            entity.MEMBER_TYPE = ((int)DTO.MemberType.Insurance).ToString();
            entity.NAMES       = "กกดกเ";
            entity.LASTNAME    = "ddddddd";
            entity.EMAIL       = "*****@*****.**";
            actual             = target.EntityValidation(DTO.RegistrationType.Insurance, entity);
            Assert.AreEqual(expected.ResultMessage, actual.ResultMessage);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }
Example #17
0
 public static object Register(DTO.Registration registration)
 {
     registration.RegisteredOn = DateTime.UtcNow;
     return(Factory.Insert(AppUsers.GetCatalog(), registration, "account.registrations", "registration_id"));
 }
Example #18
0
        private void NewRegister()
        {
            if (MasterPage.AgreementStatus)
            {
                DTO.Registration general = new DTO.Registration();



                //var attachFiles = this.AttachFiles;
                //var personAttachFiles = this.PersonAttachFiles;
                general.ID                  = IAS.BLL.Helpers.GenerateIdHelper.GetGenAutoId();
                general.ID_CARD_NO          = txtIDNumber.Text;
                general.PRE_NAME_CODE       = ddlTitle.SelectedValue;
                general.NAMES               = txtFirstName.Text;
                general.LASTNAME            = txtLastName.Text;
                general.ID_CARD_NO          = txtIDNumber.Text;
                general.BIRTH_DATE          = Convert.ToDateTime(txtBirthDay.Text);
                general.SEX                 = rblSex.SelectedValue;
                general.NATIONALITY         = ddlNationality.SelectedValue;
                general.EDUCATION_CODE      = ddlEducation.SelectedValue;
                general.EMAIL               = txtEmail.Text;
                general.LOCAL_TELEPHONE     = txtTel.Text;
                general.TELEPHONE           = txtMobilePhone.Text;
                general.ADDRESS_1           = ucAddressCurrent.Address;        // txtCurrentAddress.Text;
                general.PROVINCE_CODE       = ucAddressCurrent.ProvinceValue;  // ddlProvinceCurrentAddress.SelectedValue;
                general.AREA_CODE           = ucAddressCurrent.DistrictValue;  // ddlDistrictCurrentAddress.SelectedValue;
                general.TUMBON_CODE         = ucAddressCurrent.ParishValue;    // ddlParishCurrentAddress.SelectedValue;
                general.ZIP_CODE            = ucAddressCurrent.PostCode;       // txtPostcodeCurrentAddress.Text;
                general.LOCAL_ADDRESS1      = ucAddressRegister.Address;       // txtRegisterAddress.Text;
                general.LOCAL_PROVINCE_CODE = ucAddressRegister.ProvinceValue; // ddlProvinceRegisterAddress.SelectedValue;
                general.LOCAL_AREA_CODE     = ucAddressRegister.DistrictValue; // ddlDistrictRegisterAddress.SelectedValue;
                general.LOCAL_TUMBON_CODE   = ucAddressRegister.ParishValue;   // ddlParishRegisterAddress.SelectedValue;
                general.LOCAL_ZIPCODE       = ucAddressRegister.PostCode;      // txtPostcodeRegisterAddress.Text;
                general.CREATED_BY          = "agdoi";
                general.CREATED_DATE        = DateTime.Now;
                general.UPDATED_BY          = "agdoi";
                general.UPDATED_DATE        = DateTime.Now;
                general.REG_PASS            = MasterPage.Password;

                if (MasterPage.Password != MasterPage.ConfirmPassword)
                {
                    MasterPage.ModelError.ShowMessageError = SysMessage.NotSame;
                    MasterPage.ModelError.ShowModalError();
                    return;
                }


                BLL.RegistrationBiz biz = new BLL.RegistrationBiz();
                var result = biz.ValidateBeforeSubmit(DTO.RegistrationType.General, general);

                //    else
                //    {
                //        //AlertMessage.ShowAlertMessage(string.Empty, SysMessage.NotSame);



                //    }


                //    if (item != null)
                //    {



                //        if (result.IsError)
                //        {
                //            UCModalError.ShowMessageError = result.ErrorMsg;
                //            UCModalError.ShowModalError();
                //        }
                //        else
                //        {
                //            if (this.DataAction == DTO.DataActionMode.Add)
                //            {
                //                try
                //                {
                //                    List<DTO.RegistrationAttatchFile> attachFileList = ucAttachFiles.AttachFiles.ConvertToRegistrationAttachFiles().ToList();
                //                    attachFileList.ForEach(a => a.FILE_STATUS = BLL.AttachFilesIAS.States.AttachFileStatus.Active.Value());

                //                    var res = biz.InsertWithAttatchFile(DTO.RegistrationType.General, item, attachFileList);

                //                    if (res.IsError)
                //                    {
                //                        UCModalError.ShowMessageError = res.ErrorMsg;
                //                        UCModalError.ShowModalError();

                //                        PnlCodition.Visible = false;
                //                        PnlAddButton.Visible = true;
                //                    }
                //                    else
                //                    {

                //                        Session.Remove("TempFolderOracle");
                //                        Session.Remove("AttatchFiles");

                //                        Session.Abandon();

                //                        ClearControl();

                //                        UCModalError.Visible = false;
                //                        UCModalSuccess.Visible = false;
                //                        BLL.DataCenterBiz dbiz = new BLL.DataCenterBiz();
                //                        var r = dbiz.GetConfigApproveMember();

                //                        foreach (var items in r.DataResponse)
                //                        {
                //                            if (items.Id == "01" && items.Value == "Y")
                //                            {
                //                                string AlertWaitingForApprove = "alert('ทำการบันทึกข้อมูลเรียบร้อย รอการอนุมัติการสมัครภายหลัง');window.location.assign('../home.aspx')";
                //                                ToolkitScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alert", AlertWaitingForApprove, true);
                //                            }
                //                        }
                //                        string Alert = "alert('ทำการบันทึกข้อมูลเรียบร้อย');window.location.assign('../home.aspx')";
                //                        ToolkitScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alert", Alert, true);

                //                    }

                //                }
                //                catch (Exception ex)
                //                {
                //                    UCModalError.ShowMessageError = ex.Message;
                //                    UCModalError.ShowModalError();
                //                }

                //            }

                //        }

                //    }
                //    else
                //    {
                //        UCModalError.ShowMessageError = SysMessage.TryAgain;
                //        UCModalError.ShowModalError();
                //    }
                //}
                //else
                //{
                //    UCModalError.ShowMessageError = SysMessage.CheckCondition;
                //    UCModalError.ShowModalError();
            }
        }
Example #19
0
        private DTO.Registration GetRegistrationFromDataControl()
        {
            DTO.Registration general = new DTO.Registration();

            //var attachFiles = this.AttachFiles;
            //var personAttachFiles = this.PersonAttachFiles;
            general.ID              = MasterPage.RegistrationId;
            general.MEMBER_TYPE     = ((int)DTO.MemberType.General).ToString();
            general.ID_CARD_NO      = txtIDNumber.Text;
            general.PRE_NAME_CODE   = ddlTitle.SelectedValue;
            general.NAMES           = txtFirstName.Text;
            general.LASTNAME        = txtLastName.Text;
            general.ID_CARD_NO      = txtIDNumber.Text;
            general.BIRTH_DATE      = Convert.ToDateTime(txtBirthDay.Text);
            general.SEX             = rblSex.SelectedValue;
            general.NATIONALITY     = ddlNationality.SelectedValue;
            general.EDUCATION_CODE  = ddlEducation.SelectedValue;
            general.EMAIL           = txtEmail.Text;
            general.LOCAL_TELEPHONE = txtTel.Text + ((String.IsNullOrWhiteSpace(txtTelExt.Text)) ? "" : ("#" + txtTelExt.Text.Trim()));;

            general.TELEPHONE           = txtMobilePhone.Text;
            general.ADDRESS_1           = ucAddressCurrent.Address;        // txtCurrentAddress.Text;
            general.PROVINCE_CODE       = ucAddressCurrent.ProvinceValue;  // ddlProvinceCurrentAddress.SelectedValue;
            general.AREA_CODE           = ucAddressCurrent.DistrictValue;  // ddlDistrictCurrentAddress.SelectedValue;
            general.TUMBON_CODE         = ucAddressCurrent.ParishValue;    // ddlParishCurrentAddress.SelectedValue;
            general.ZIP_CODE            = ucAddressCurrent.PostCode;       // txtPostcodeCurrentAddress.Text;
            general.LOCAL_ADDRESS1      = ucAddressRegister.Address;       // txtRegisterAddress.Text;
            general.LOCAL_PROVINCE_CODE = ucAddressRegister.ProvinceValue; // ddlProvinceRegisterAddress.SelectedValue;
            general.LOCAL_AREA_CODE     = ucAddressRegister.DistrictValue; // ddlDistrictRegisterAddress.SelectedValue;
            general.LOCAL_TUMBON_CODE   = ucAddressRegister.ParishValue;   // ddlParishRegisterAddress.SelectedValue;
            general.LOCAL_ZIPCODE       = ucAddressRegister.PostCode;      // txtPostcodeRegisterAddress.Text;
            general.CREATED_BY          = "agdoi";
            general.CREATED_DATE        = DateTime.Now;
            general.UPDATED_BY          = "agdoi";
            general.UPDATED_DATE        = DateTime.Now;
            general.REG_PASS            = MasterPage.Password;

            //get result
            if (!this.MasterPage.ActionMode.Equals(IAS.DTO.DataActionMode.Add))
            {
                BLL.RegistrationBiz regBiz = new BLL.RegistrationBiz();
                var res = regBiz.GetById(general.ID.ToString());
                if (res != null)
                {
                    if (res.DataResponse.APPROVE_RESULT != null)
                    {
                        general.APPROVE_RESULT = res.DataResponse.APPROVE_RESULT;
                    }
                }
            }
            else
            {
                general.APPROVE_RESULT = "";
            }

            //general.AGENT_TYPE = ddlAgentType.SelectedValue;
            //SELECT FROM AG_AGENT_TYPE_R > Z = ตัวแทนและนายหน้า
            general.AGENT_TYPE    = "Z";
            general.IMPORT_STATUS = this.MasterPage.NullableString(this.MasterPage.ImportStatus);

            return(general);
        }
Example #20
0
 private void ThrowRegistrationIssie(DTO.Registration registration)
 {
 }
Example #21
0
 public DTO.ResponseService <DTO.Registration> Update(DTO.Registration ent, List <DTO.RegistrationAttatchFile> attachFiles)
 {
     DTO.ResponseService <DTO.Registration> res = svc.UpdateWithAttachFiles(ent, attachFiles.ToArray());
     return(res);
 }
Example #22
0
 public DTO.ResponseService <DTO.Registration> Update(DTO.Registration ent)
 {
     DTO.ResponseService <DTO.Registration> res = svc.Update(ent);
     return(res);
 }
Example #23
0
 public DTO.ResponseMessage <bool> ValidateBeforeSubmit(DTO.RegistrationType registerType,
                                                        DTO.Registration entity)
 {
     return(svc.ValidateBeforeSubmit(registerType, entity));
 }
Example #24
0
 public DTO.ResponseService <DTO.Registration> Insert(DTO.Registration ent,
                                                      DTO.RegistrationType registrationType)
 {
     DTO.ResponseService <DTO.Registration> res = svc.Insert(ent, registrationType);
     return(res);
 }
Example #25
0
 public DTO.ResponseMessage <bool> EntityValidation(DTO.RegistrationType registerType, DTO.Registration entity)
 {
     return(svc.EntityValidation(registerType, entity));
 }