예제 #1
0
        public PartialViewResult Lines(string orderID)
        {
            DataTable       dt      = new DataTable();
            BusssinessLogic objbal  = new BusssinessLogic();
            List <Lines>    lstline = new List <Lines>();

            try
            {
                //BalGetdataByOrderIdLines
                //ProductID Qty price extPrice    uom Description
                dt = objbal.BalGetdataByOrderIdLines(orderID);
                if (dt.Rows.Count > 0)
                {
                    foreach (DataRow dr in dt.Rows)
                    {
                        lstline.Add(
                            new Lines
                        {
                            Description = dr["Description"].ToString(),
                            ProductID   = dr["ProductID"].ToString(),
                            Qty         = dr["Qty"].ToString(),
                            Price       = dr["Price"].ToString(),
                            ExtPrice    = dr["ExtPrice"].ToString(),
                            UOM         = dr["UOM"].ToString(),
                            Discount    = dr["Discount"].ToString(),
                            WrhsID      = dr["WrhsID"].ToString(),
                            Line        = dr["Line"].ToString()
                        }

                            );
                    }
                }
                else
                {
                    lstline.Add(
                        new Lines
                    {
                        Description = "",
                        ProductID   = "",
                        Qty         = "",
                        Price       = "",
                        ExtPrice    = "",
                        UOM         = "",
                        Discount    = "",
                        WrhsID      = "",
                        Line        = ""
                    }

                        );
                }
            }
            catch (Exception ex) {
                throw ex;
            }

            return(PartialView(lstline));
        }