Beispiel #1
0
       public string insertCustomers(Customers orduser)
       {
           TransactionManager transaction = null;
           try
           {
               transaction = DataRepository.Provider.CreateTransaction();
               transaction.BeginTransaction();

               orduser.IsActive = true;
               if (DataRepository.CustomersProvider.Insert(orduser))
               {
                   // Show proper message
               }
               else
               {
                   return "Information could not be saved.";
               }
               transaction.Commit();
               return "Information Insert successfully.";
           }
           catch (Exception e)
           {
               transaction.Rollback();
               return "Information could not be saved.Please contact Administrator.";
           }
       }
Beispiel #2
0
        protected void btnSub_Click(object sender, EventArgs e)
        {
            String UserName = TxtUser.Text;
            String Pass = Txtpass.Text;
            if (UserName != null && Pass != null)
            {
                objcust = objaccount.validateUser(UserName, Pass);
                if (objcust != null)
                {
                    Session["UserName"] = UserName;
                    Response.Redirect("~/ADMIN/DashBoard.aspx", false);
                }
            }

        }
Beispiel #3
0
 public Customers GetCustomersByID(int id)
 {
     objcust = null;
     objcust = DataRepository.CustomersProvider.GetById(id);
     return objcust;
 }