예제 #1
0
        private List <Outwarditems> Collectitems(string vId)
        {
            List <Outwarditems> list = new List <Outwarditems>();

            for (int r = 0; r < editgrid.RowCount; r++)
            {
                Outwarditems obj = new Outwarditems();

                if (
                    (editgrid[OUTWARDITEMS.PRODUCT_ID, r].Value + "") == "" ||
                    (editgrid[OUTWARDITEMS.COLOURS_ID, r].Value + "") == "" ||
                    (editgrid[OUTWARDITEMS.SIZES_ID, r].Value + "") == "" ||
                    (editgrid[OUTWARDITEMS.QTY, r].Value + "") == ""
                    )
                {
                    //==LEAVE IT(the empty row).
                }
                else
                {
                    obj.Outwarditems_id = "";
                    obj.Outward_id      = vId;
                    obj.Style_id        = CStyle_exten.GetId_Name(Checks.Escape(editgrid[OUTWARDITEMS.STYLE_ID, r].Value + ""));
                    obj.Article_id      = CArticle_exten.GetId_Name(Checks.Escape(editgrid[OUTWARDITEMS.ARTICLE_ID, r].Value + ""));
                    obj.Product_id      = CProduct_exten.GetId_Name(Checks.Escape(editgrid[OUTWARDITEMS.PRODUCT_ID, r].Value + ""));
                    obj.Sizes_id        = CSizes_exten.GetId_Name(editgrid[OUTWARDITEMS.SIZES_ID, r].Value + "");
                    obj.Colours_id      = CColours_exten.GetId_Name(editgrid[OUTWARDITEMS.COLOURS_ID, r].Value + "");
                    obj.Qty             = (editgrid[OUTWARDITEMS.QTY, r].Value + "");
                    //obj.Refered_id = "";
                    obj.Locked = Core.Unlocked;

                    list.Add(obj);
                }
            }

            if (list.Count != 0)
            {
                return(list);
            }

            return(null);
        }
예제 #2
0
        private List <Orderitems> Collectitems(string vId)
        {
            List <Orderitems> list = new List <Orderitems>();

            for (int r = 0; r < editgrid.RowCount; r++)
            {
                Orderitems obj = new Orderitems();

                if (
                    (editgrid[ORDERITEMS.STYLE_ID, r].Value + "") == "" ||
                    (editgrid[ORDERITEMS.QTY, r].Value + "") == "" ||
                    (editgrid[ORDERITEMS.PRICE, r].Value + "") == ""
                    )
                {
                    //==LEAVE IT(the empty row).
                }
                else
                {
                    obj.Orderitems_id = "";
                    obj.Order_id      = vId;
                    obj.Order_no      = txt_order_no.Text;
                    obj.Style_id      = CStyle_exten.GetId_Name(editgrid[ORDERITEMS.STYLE_ID, r].Value + "");
                    obj.Style_name    = (editgrid[ORDERITEMS.STYLE_NAME, r].Value + "");
                    obj.Colours_id    = CColours_exten.GetId_Name(editgrid[ORDERITEMS.COLOURS_ID, r].Value + "");
                    obj.Qty           = (editgrid[ORDERITEMS.QTY, r].Value + "");
                    obj.Price         = ConvertTO.Decimal(editgrid[ORDERITEMS.PRICE, r].Value + "");
                    obj.Mrp           = ConvertTO.Decimal(editgrid[ORDERITEMS.MRP, r].Value + "");
                    obj.Refered_id    = "";
                    obj.Locked        = Core.Unlocked;

                    list.Add(obj);
                }
            }

            if (list.Count != 0)
            {
                return(list);
            }

            return(null);
        }