public string InsertUpdateChartAccount(ArrayList ChartsofAccount,string m) { CRM.DataAccess.AdministratorEntity.ChartsofAccountsStoredProcedure objinsertaccount = new CRM.DataAccess.AdministratorEntity.ChartsofAccountsStoredProcedure(); ChartsofAccount.Insert(14, Session["usersid"].ToString()); //objinsertaccount.InsertUpdateChartsofAccounts(ChartsofAccount); System.Data.DataSet ds1 = objinsertaccount.CheckValidation(); int j = 0; int k = 0; for (int i = 0; i < ds1.Tables[3].Rows.Count; i++) { if ((ds1.Tables[3].Rows[i]["GL_CODE"].ToString().Equals(ChartsofAccount[1]) || (ChartsofAccount[1]).Equals(""))) { j = 1; break; } } for (int i = 0; i < ds1.Tables[4].Rows.Count; i++) { if ((ds1.Tables[4].Rows[i]["GL_DESCRIPTION"].ToString().Equals(ChartsofAccount[2]) || (ChartsofAccount[2]).Equals(""))) { k = 1; break; } } if (j == 0 && k==0) { objinsertaccount.InsertUpdateChartsofAccounts(ChartsofAccount); } else if (j == 1 || k==1) { System.Data.DataSet ds = objinsertaccount.InsertUpdateChartsofAccounts(ChartsofAccount); m = ds.Tables[0].Rows[0]["SUPPLIER_CHECKER"].ToString(); if (m == "N") { } if (m == "Y") { } if (m == "NA") { } } return m; }
public void delChartsofAccount(int delchartofaccount) { CRM.DataAccess.AdministratorEntity.ChartsofAccountsStoredProcedure objchartsofaccount = new CRM.DataAccess.AdministratorEntity.ChartsofAccountsStoredProcedure(); objchartsofaccount.delchartAccount(delchartofaccount); }