Пример #1
0
        public void List_Option(ListOption action)
        {
            fAction = action;

            switch (fAction)
            {
            case ListOption.active:

                if (chk_notactive.Checked == true)
                {
                    LoadData(CPo_exten.NotActive());
                }
                else
                {
                    LoadData(CPo_exten.Active());
                }

                break;

            case ListOption.notactive:

                if (chk_notactive.Checked == true)
                {
                    LoadData(CPo_exten.NotActive());
                }
                else
                {
                    LoadData(CPo_exten.Active());
                }

                break;

            case ListOption.Search:
                if (txt_po_no.Text != "")
                {
                    List <Po> list = new List <Po>
                    {
                        CPo_exten.SearchName(txt_po_no.Text)
                    };
                    LoadData(list);
                }
                else
                {
                    LoadData(CPo_exten.Active());
                }
                break;

            default:
                LoadData(CPo_exten.Active());
                break;
            }
        }
Пример #2
0
        private Style CollectData()
        {
            Style fobj = new Style()
            {
                Style_id   = vId,
                Uniqueno   = Current.Acy_id + "~" + Current.Company_id + "~" + txt_style_no.Text,
                Company_id = Current.Company_id,
                Acy_id     = Current.Acy_id,
                Style_no   = txt_style_no.Text,
                Po_id      = CPo_exten.GetId_Name(txt_po_id.Text),
                Style_name = txt_style_name.Text,
                Locked     = Core.Unlocked,
                Active_id  = Core.Stative,
                Notes      = txt_notes.Text,
                User_id    = Current.User
            };

            return(fobj);
        }
Пример #3
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);
        }
Пример #4
0
        public void SetAction(BtnEvent action, string pk)
        {
            fAction = action;

            switch (fAction)
            {
            case BtnEvent.Open:
                btn_save.Text = "&CLOSE";
                obj           = CPo_exten.PKId(pk);
                this.EnableControls(false);
                break;

            case BtnEvent.New:
                btn_save.Text = "&SAVE";
                obj           = CPo.GetNew;
                this.EnableControls(true);
                break;

            case BtnEvent.Edit:
                btn_save.Text = "&UPDATE";
                obj           = CPo_exten.PKId(pk);
                this.EnableControls(true);
                break;

            case BtnEvent.Delete:
                btn_save.Text = "CONFIRM\r\n&DELETE";
                obj           = CPo_exten.PKId(pk);
                this.EnableControls(false);
                break;

            case BtnEvent.Print:
                btn_save.Text = "&PRINT";
                obj           = CPo_exten.PKId(pk);
                this.EnableControls(false);
                break;
            }

            this.LoadData();
        }
Пример #5
0
 void Txt_po_LookupUpdate(object sender, EventArgs e)
 {
     txt_po_id.LookupList = CPo_exten.GetforLookup();
 }