public List <POR_SP_GetPartDetails_OfGRN_Result> AddPartIntoReceipt_TempData(string MIND_IDs, long IssueID, long SiteID, string IssuedQtySameAs, string paraSessionID, string paraUserID, string paraCurrentObjectName, string[] conn) { BISPL_CRMDBEntities db = new BISPL_CRMDBEntities(svr.GetEntityConnection(conn)); /*Begin : Get Existing Records from TempData*/ List <POR_SP_GetPartDetails_OfGRN_Result> existingList = new List <POR_SP_GetPartDetails_OfGRN_Result>(); existingList = GetExistingTempDataBySessionIDObjectName(paraSessionID, paraUserID, paraCurrentObjectName, conn); /*End*/ /*Get Product Details*/ List <POR_SP_GetPartDetails_OfGRN_Result> getnewRec = new List <POR_SP_GetPartDetails_OfGRN_Result>(); getnewRec = (from view in db.POR_SP_GetPartDetails_OfGRN(MIND_IDs, IssueID, 0, SiteID) orderby view.Sequence select view).ToList(); /*End*/ /*Begin : Merge (Existing + Newly Added) Products to Create TempData of AddToCart*/ List <POR_SP_GetPartDetails_OfGRN_Result> mergedList = new List <POR_SP_GetPartDetails_OfGRN_Result>(); mergedList.AddRange(existingList); mergedList.AddRange(getnewRec); /*End*/ /*Begin : Serialize & Save MergedAddToCartList*/ SaveTempDataToDB(mergedList, paraSessionID, paraUserID, paraCurrentObjectName, conn); /*End*/ return(mergedList); }
public List <POR_SP_GetPartDetails_OfGRN_Result> GetReceiptPartDetailByReceiptID(long ReceiptID, long SiteID, string sessionID, string userID, string CurrentObject, string IssuedQtySameAs, string[] conn) { BISPL_CRMDBEntities db = new BISPL_CRMDBEntities(svr.GetEntityConnection(conn)); List <POR_SP_GetPartDetails_OfGRN_Result> PartDetail = new List <POR_SP_GetPartDetails_OfGRN_Result>(); PartDetail = db.POR_SP_GetPartDetails_OfGRN("0", 0, ReceiptID, SiteID).ToList(); SaveTempDataToDB(PartDetail, sessionID, userID, CurrentObject, conn); return(PartDetail); }
protected string EMailGetReceiptPratDetail(long ReceiptID, long SietID, string[] conn) { string result = ""; try { List <POR_SP_GetPartDetails_OfGRN_Result> htmlList = new List <POR_SP_GetPartDetails_OfGRN_Result>(); if (ReceiptID != 0) { BISPL_CRMDBEntities db = new BISPL_CRMDBEntities(svr.GetEntityConnection(conn)); htmlList = db.POR_SP_GetPartDetails_OfGRN("0", 0, ReceiptID, SietID).ToList(); } int srno = 0; XElement xmlEle = new XElement("table", from rec in htmlList select new XElement("tr", new XElement("td", (srno = srno + 1) + "."), new XElement("td", rec.Prod_Code), new XElement("td", rec.Prod_Name), new XElement("td", rec.Prod_Description), new XElement("td1", rec.ReceivedQty), new XElement("td", rec.UOM), new XElement("td1", rec.ChallanQty))); string tblHeader = "<br /><table cellpadding='2' cellspacing='5' style='text-align: left; font-family: Tahoma; font-size: 12px;'>"; tblHeader = tblHeader + "<tr><td colspan='7'><b>Receipt Part Details : </b></td></tr>" + "<tr>" + "<td style='font-weight: bold; text-align: center; border-bottom: solid 1px gray; border-top: solid 1px gray;'>Sr.No.</td>" + "<td style='font-weight: bold; text-align: center; border-bottom: solid 1px gray; border-top: solid 1px gray;'>Part Code</td>" + "<td style='font-weight: bold; text-align: center; border-bottom: solid 1px gray; border-top: solid 1px gray;'>Part Name</td>" + "<td style='font-weight: bold; text-align: center; border-bottom: solid 1px gray; border-top: solid 1px gray;'>Part Description</td>" + "<td style='font-weight: bold; text-align: center; border-bottom: solid 1px gray; border-top: solid 1px gray;'>Receipt Qty</td>" + "<td style='font-weight: bold; text-align: center; border-bottom: solid 1px gray; border-top: solid 1px gray;'>UOM</td>" + "<td style='font-weight: bold; text-align: center; border-bottom: solid 1px gray; border-top: solid 1px gray;'>Issued Qty</td></tr>"; //result = result + xmlEle.ToString().Replace("<table>", tblHeader); result = result + xmlEle.ToString().Replace("<table>", tblHeader).Replace("<td1>", "<td style='text-align: right;'>").Replace("</td1>", "</td>"); } catch { } return(result); }