コード例 #1
0
        public bool Create()
        {
            // Check Html Info
            string CustomerName       = txt_CustomerName.Text;
            string CustomerTel        = txt_CustomerTel.Text;
            string CustomerFax        = txt_CustomerFax.Text;
            string CustomerEmail      = txt_CustomerEmail.Text;
            string CustomerAddress    = txt_CustomerAddress.Text;
            string CustomerUser       = txt_CustomerUser.Text;
            string CustomerUserMobile = txt_CustomerUserMobile.Text;

            int Resualt = MPB.Create_Customer(CustomerName, CustomerTel, CustomerFax, CustomerEmail, CustomerAddress
                                              , CustomerUser, CustomerUserMobile);

            if (Resualt != 0)
            {
                string UserPass = CommonBusiness.RandomString(10, true);
                // Adobe ساختن کاربر در
                string DomainAddress      = "kadobe.iauec.ac.ir";
                string DomainLogin        = "******";
                string DomainPassword     = "******";
                Cookie DomainCookies      = MPB.Adobe_Login(DomainAddress, DomainLogin, DomainPassword);
                string DomainCookiesValue = DomainCookies.Value;

                MPB.Adobe_Create_User(DomainAddress, CustomerName, "Admin", "customer" + Resualt.ToString()
                                      , UserPass, DomainCookiesValue);

                // بروز رسانی در جدول مشتری
                MPB.Update_Customers_ById(1, Resualt, "customer" + Resualt.ToString(), UserPass, 0, "");

                // نمایش در صفحه
                lbl_UserAdobe.Text = "نام کاربری این مشتری در آدابی: " + "customer" + Resualt.ToString();
                lbl_UserPass.Text  = "کلمه عبور این مشتری در آدابی: " + UserPass;

                CustomerInfo.Visible = true;

                return(true);
            }

            return(false);
        }