예제 #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 <Styleitems> Collectitems(string vId)
        {
            List <Styleitems> list = new List <Styleitems>();

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

                if (
                    (editgrid[STYLEITEMS.PRODUCT_ID, r].Value + "") == "" ||
                    (editgrid[STYLEITEMS.QTY, r].Value + "") == "" ||
                    (editgrid[STYLEITEMS.PRICE, r].Value + "") == ""
                    )
                {
                    //==LEAVE IT(the empty row).
                }
                else
                {
                    obj.Styleitems_id = "";
                    obj.Style_id      = vId;
                    obj.Style_no      = txt_style_no.Text;
                    obj.Article_id    = CArticle_exten.GetId_Name(editgrid[STYLEITEMS.ARTICLE_ID, r].Value + "");
                    obj.Product_id    = CProduct_exten.GetId_Name(editgrid[STYLEITEMS.PRODUCT_ID, r].Value + "");
                    obj.Colours_id    = CColours_exten.GetId_Name(editgrid[STYLEITEMS.COLOURS_ID, r].Value + "");
                    obj.Sizes_id      = CSizes_exten.GetId_Name(editgrid[STYLEITEMS.SIZES_ID, r].Value + "");
                    obj.Qty           = (editgrid[STYLEITEMS.QTY, r].Value + "");
                    obj.Price         = ConvertTO.Decimal(editgrid[STYLEITEMS.PRICE, r].Value + "");
                    obj.Refered_id    = "";
                    obj.Locked        = Core.Unlocked;

                    list.Add(obj);
                }
            }

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

            return(null);
        }