internal DataTable LoadMainCost(SectionSubSectionModel ObjSectionSubSectionModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPCostCentre"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@Ind", ObjSectionSubSectionModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", ObjSectionSubSectionModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@BrID", ObjSectionSubSectionModel.BrID); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtCostCentre = new DataTable(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtCostCentre); dtCostCentre.TableName = "success"; } catch (Exception) { dtCostCentre = new DataTable(); dtCostCentre.TableName = "error"; return(dtCostCentre); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtCostCentre); }
public DataTable DeleteCostCentre(SectionSubSectionModel ObjSectionSubSectionModel) { DataTable CostCentreList = ObjSectionSubSectionDA.DeleteCostCentre(ObjSectionSubSectionModel); return(CostCentreList); }
public DataTable LoadCostCentreGrid(SectionSubSectionModel ObjSectionSubSectionModel) { DataTable CostCentreList = ObjSectionSubSectionDA.LoadMainCost(ObjSectionSubSectionModel); return(CostCentreList); }