Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #3
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);
        }
Beispiel #4
0
        private Article CollectData()
        {
            Article fobj = new Article()
            {
                Article_id = vId,
                Po_id      = CPo_exten.GetId_Name(txt_po_id.Text),
                Article_no = txt_article_no.Text,
                Product_id = CProduct_exten.GetId_Name(txt_product_id.Text),
                Hsncode_id = CHsncode_exten.GetId_Name(txt_hsncode_id.Text),
                Sizes_id   = CSizes_exten.GetId_Name(txt_sizes_id.Text),
                Colours_id = CColours_exten.GetId_Name(txt_colours_id.Text),
                Qty        = txt_qty.Text,
                Price      = ConvertTO.Decimal(txt_price.Text),
                Barcode    = txt_barcode.Text,
                Active_id  = Core.Stative,
                Notes      = txt_notes.Text,
                User_id    = Current.User
            };

            return(fobj);
        }
Beispiel #5
0
        private List <Creditnoteitems> Collectitems(string vId)
        {
            List <Creditnoteitems> list = new List <Creditnoteitems>();

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

                if (
                    (editgrid[CREDITNOTEITEMS.PRODUCT_ID, r].Value + "") == "" ||
                    (editgrid[CREDITNOTEITEMS.QTY, r].Value + "") == "" ||
                    (editgrid[CREDITNOTEITEMS.PRICE, r].Value + "") == ""
                    )
                {
                    //==LEAVE IT(the empty row).
                }
                else
                {
                    obj.Creditnoteitems_id = "";
                    obj.Creditnote_id      = vId;

                    if (Customised.WithPo == true)
                    {
                        obj.Po_no = Checks.Escape(editgrid[CREDITNOTEITEMS.PO_NO, r].Value + "");
                    }
                    else
                    {
                        obj.Po_no = "0";
                    }

                    if (Customised.WithDc == true)
                    {
                        obj.Dc_no = Checks.Escape(editgrid[CREDITNOTEITEMS.DC_NO, r].Value + "");
                    }
                    else
                    {
                        obj.Dc_no = "0";
                    }

                    obj.Product_id = CProduct_exten.GetId_Name(Checks.Escape(editgrid[CREDITNOTEITEMS.PRODUCT_ID, r].Value + ""));

                    if (Customised.WithSizes == true)
                    {
                        obj.Sizes_id = CSizes_exten.GetId_Name(editgrid[CREDITNOTEITEMS.SIZES_ID, r].Value + "");
                    }
                    else
                    {
                        obj.Sizes_id = "1";
                    }

                    if (Customised.WithColours == true)
                    {
                        obj.Colours_id = CColours_exten.GetId_Name(editgrid[CREDITNOTEITEMS.COLOURS_ID, r].Value + "");
                    }
                    else
                    {
                        obj.Colours_id = "1";
                    }


                    obj.Qty          = (editgrid[CREDITNOTEITEMS.QTY, r].Value + "");
                    obj.Price        = ConvertTO.Decimal(editgrid[CREDITNOTEITEMS.PRICE, r].Value + "");
                    obj.Cgst_percent = ConvertTO.Decimal(editgrid[CREDITNOTEITEMS.CGST_PERCENT, r].Value + "");
                    obj.Sgst_percent = ConvertTO.Decimal(editgrid[CREDITNOTEITEMS.SGST_PERCENT, r].Value + "");
                    obj.Igst_percent = ConvertTO.Decimal(editgrid[CREDITNOTEITEMS.IGST_PERCENT, r].Value + "");
                    obj.Refered_id   = "";
                    obj.Locked       = Core.Unlocked;

                    list.Add(obj);
                }
            }

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

            return(null);
        }