Exemple #1
0
 public bool DeleteRFQ(tbl_RFQHeader ObjectToBeDeleted)
 {
     using (var context = new WorkFlowManagerDBEntities())
     {
         try
         {
             var temp = context.RFQByDocNum(ObjectToBeDeleted.DocNumber);
             context.DeleteObject(temp);
             context.SaveChanges();
             return(true);
         }
         catch (System.Exception ex)
         {
             throw ex;
         }
     }
 }
Exemple #2
0
        public tbl_RFQHeader GetRFQ(string docNum, out List <TblColor> colorsList)
        {
            using (var context = new WorkFlowManagerDBEntities())
            {
                try
                {
                    var temp = context.RFQByDocNum(docNum);
                    colorsList = new List <TblColor>();
                    int test;
                    foreach (var row in GetTblColorLink(0, 50, temp.BrandCode, 1, 1, "it.TblBrand", null, null, out test))
                    {
                        colorsList.Add(row.TblColor1);
                    }

                    //     colorsList = GetTblColorLink(temp.BrandCode,0, temp.TransID);
                    return(temp);
                }
                catch
                {
                    throw new Exception("Document number does not exist");
                }
            }
        }