public static string GetNewTransactionCode(string Query) { string s2 = string.Empty; DataSet ds = ProjectFunctionsUtils.GetDataSet(Query); if (ds.Tables[0].Rows.Count > 0) { s2 = ds.Tables[0].Rows[0][0].ToString(); s2 = (Convert.ToInt32(s2) + 1).ToString(); } return(s2); }
public static bool CheckAllPossible(string ArticleID, decimal MRP, string ColorID, string SizeID) { DataSet dsCheckART = ProjectFunctionsUtils.GetDataSet("select ARTSYSID,ARTMRP from ARTICLE where ARTSYSID='" + ArticleID + "' "); if (dsCheckART.Tables[0].Rows.Count > 0) { if (MRP == Convert.ToDecimal(dsCheckART.Tables[0].Rows[0]["ARTMRP"])) { } else { ProjectFunctionsUtils.SpeakError("Wrong MRP Found"); return(false); } } else { ProjectFunctionsUtils.SpeakError("No Article Found"); return(false); } DataSet dsCheckColor = ProjectFunctionsUtils.GetDataSet("select COLSYSID from COLOURS where COLSYSID='" + ColorID + "' "); if (dsCheckColor.Tables[0].Rows.Count > 0) { } else { ProjectFunctionsUtils.SpeakError("No Color Found"); return(false); } DataSet dsCheckSize = ProjectFunctionsUtils.GetDataSet("select SZSYSID from SIZEMAST where SZSYSID='" + SizeID + "' "); if (dsCheckSize.Tables[0].Rows.Count > 0) { } else { ProjectFunctionsUtils.SpeakError("No Size Found"); return(false); } return(true); }