public int DeleteAccountGroupReport(AccountGroupReportEntity oAccountGroupReportEntity) { con = oConnectionDatabase.DatabaseConnection(); int i = 0; cmd = new SqlCommand("DELETE FROM tblAccountGroupReport WHERE AccGrpSLR=" + oAccountGroupReportEntity.AccGrpSLR, con); try { cmd.CommandType = CommandType.Text; cmd.ExecuteNonQuery(); i = 1; } catch { } con.Close(); return(i); }
public int UpdateAccountGroupReport(AccountGroupReportEntity oAccountGroupReportEntity) { con = oConnectionDatabase.DatabaseConnection(); int i = 0; cmd = new SqlCommand("UPDATE tblAccountGroupReport SET AccGrpCodeR='" + oAccountGroupReportEntity.AccGrpCodeR + "',AccGrpNameR='" + oAccountGroupReportEntity.AccGrpNameR + "' WHERE AccGrpSLR=" + oAccountGroupReportEntity.AccGrpSLR, con); try { cmd.CommandType = CommandType.Text; cmd.ExecuteNonQuery(); i = 1; } catch { } con.Close(); return(i); }
public int InsertAccountGroupReport(AccountGroupReportEntity oAccountGroupReportEntity) { con = oConnectionDatabase.DatabaseConnection(); int i = 0; cmd = new SqlCommand("INSERT INTO tblAccountGroupReport (AccGrpCodeR,AccGrpNameR) VALUES('" + oAccountGroupReportEntity.AccGrpCodeR + "','" + oAccountGroupReportEntity.AccGrpNameR + "')", con); try { cmd.CommandType = CommandType.Text; cmd.ExecuteNonQuery(); i = 1; } catch { } con.Close(); return(i); }