public string GenerateProductCode(LP_GenerateTransNumber_Property objtransno) { string TransactionNumber = ""; objProduct_DAL = new Product_DAL(); DataTable dt = objProduct_DAL.GenerateProductCode(objtransno); if (dt.Rows.Count > 0) { foreach (DataRow dr in dt.Rows) { TransactionNumber = dr["TransNumber"].ToString(); TransactionNumber = "P-00" + TransactionNumber + "-" + objtransno.userid; } return(TransactionNumber); } else { TransactionNumber = "P-001-" + objtransno.userid; return(TransactionNumber); } //return _objMRNDAL.GenerateMRNNo(objtransno); }