コード例 #1
0
 public int ChangeInformationConfirm(FormCollection f)
 {
     try
     {
         AccountBusiness ab = new AccountBusiness();
         int cusUserId = Convert.ToInt32(Session["UserId"]);
         string sName = f["txtName"];
         string sAddress = f["txtAdress"];
         string sEmail = f["txtEmail"];
         string sTaxCode = f["txtTaxCode"];
         string sPhone = f["txtPhone"];
         if (ab.checkEmailExisted(cusUserId, sEmail))
         {
             return -1;
         }
         if (ab.checkPhoneExisted(cusUserId, sPhone))
         {
             return -2;
         }
         if (ab.checkTaxCodeExisted(cusUserId, sTaxCode))
         {
             return -3;
         }
         ab.ChangeInformation(cusUserId, sName, sEmail, sAddress, sTaxCode, sPhone);
         return 1;
     }
     catch
     {
         return -4;
     }
 }