public static void UpdateEmployee(Employee employee) { try { CommonDAL.UpdateData(CommonSQLStrings.UpdateEmployeeQuery(employee)); } catch (Exception ex) { throw new Exception(ex.Message.ToString()); } }
public static DataSet GetEmployees() { DataSet ds = null; try { DataTable dt = CommonDAL.GetData(CommonSQLStrings.GetEmployeesQuery()); ds = new DataSet(); ds.Tables.Add(dt); } catch (Exception ex) { throw new Exception(ex.Message.ToString()); } return(ds); }
internal static void UpdateData(Employee employee) { using (SqlConnection con = new SqlConnection(DBConnection.TheInstance.GetConnectionString())) { SqlTransaction tran = null; try { con.Open(); tran = con.BeginTransaction(); CommonDAL.UpdateData(CommonSQLStrings.UpdateEmployeeQuery(employee), con, tran); tran.Commit(); } catch (Exception ex) { if (tran != null) { tran.Rollback(); } throw new Exception(ex.Message.ToString()); } finally { con.Close(); } } }
public static DataTable GetCustomerSearchData() { return(CommonDAL.GetData(CommonSQLStrings.GetCustomerQuery(""))); }
public static DataTable GetOperationSearchData(string customerCode) { return(CommonDAL.GetData(CommonSQLStrings.GetOperationQuery(customerCode))); }