Example #1
0
 public Object GetRecord(String BillID)
 {
     BillLayoutMaster bill = new BillLayoutMaster();
     try
     {
         bill = DAL.DALBILLClass.GetBillHeader(BillID);
     }
     catch (Exception ex)
     {
         throw;
     }
     return bill;
 }
Example #2
0
        public static BillLayoutMaster GetBillHeader(String BillNo)
        {
            BillLayoutMaster bill = new BillLayoutMaster();
            try
            {
                using (var context = new SycousCon())
                {

                    try
                    {
                        var parBillNo = new SqlParameter
                        {
                            ParameterName = "BillNo",
                            Value = BillNo,
                            Direction = ParameterDirection.Input
                        };
                        bill = context.ExecuteStoreQuery<BillLayoutMaster>("exec SYCOUS.GetBillHeaderInfo @BillNo", parBillNo).FirstOrDefault();
                    }
                    catch (Exception ex)
                    {
                        context.Dispose();
                        throw;
                    }
                }// using
                }
            catch (Exception ex)
            {
                throw;
            }
            return bill;
        }