Beispiel #1
0
 //insert data into database
 public Int32?insert(ContactUsDataClass obj)
 {
     try
     {
         obj_con.clearParameter();
         createParameter(obj, DBTrans.Insert);
         obj_con.BeginTransaction();
         obj_con.ExecuteNoneQuery("sp_ContactUsData_insert", CommandType.StoredProcedure);
         obj_con.CommitTransaction();
         return(obj.Contactusdataid = Convert.ToInt32(obj_con.getValue("@Contactusdataid")));
     }
     catch (Exception ex)
     {
         obj_con.RollbackTransaction();
         throw new Exception("sp_ContactUsData_insert:" + ex.Message);
     }
 }
Beispiel #2
0
 //insert data into database
 public Int32 insert(usersClass obj)
 {
     try
     {
         obj_con.clearParameter();
         createParameter(obj, DBTrans.Insert);
         obj_con.BeginTransaction();
         obj_con.ExecuteNoneQuery("sp_users_insert", CommandType.StoredProcedure);
         obj_con.CommitTransaction();
         return(obj.Userid = Convert.ToInt32(obj_con.getValue("@Userid")));
     }
     catch (Exception ex)
     {
         obj_con.RollbackTransaction();
         throw new Exception("sp_users_insert");
     }
 }
Beispiel #3
0
 //insert data into database
 public Int32?insert(GeneralSettingsClass obj)
 {
     try
     {
         obj_con.clearParameter();
         createParameter(obj, DBTrans.Insert);
         obj_con.BeginTransaction();
         obj_con.ExecuteNoneQuery("sp_GeneralSettings_insert", CommandType.StoredProcedure);
         obj_con.CommitTransaction();
         return(obj.Generalsettings = Convert.ToInt32(obj_con.getValue("@Generalsettings")));
     }
     catch (Exception ex)
     {
         obj_con.RollbackTransaction();
         throw new Exception("sp_GeneralSettings_insert:" + ex.Message);
     }
 }