Esempio n. 1
0
        public static string GetHsncode_name(string name)
        {
            Product obj = CProduct_exten.SearchName(name, new DAL());

            if (obj != null)
            {
                return(obj.Hsncode_id);
            }
            return("");
        }
Esempio n. 2
0
        public static string GetHsncode_Id(string product_id)
        {
            Product obj = CProduct_exten.PKId(product_id, new DAL());

            if (obj != null)
            {
                return(obj.Hsncode_id);
            }
            return("");
        }
Esempio n. 3
0
        public static string GetIgst_Name(string _pName)
        {
            Product obj = CProduct_exten.SearchName(_pName, new DAL());

            if (obj != null)
            {
                return(obj.Igst_percent);
            }
            return("");
        }
Esempio n. 4
0
        public void List_Option(ListOption pAction)
        {
            fAction = pAction;

            switch (fAction)
            {
            case ListOption.active:

                if (chk_notactive.Checked == true)
                {
                    LoadData(CProduct_exten.NotActive(new DAL()));
                }
                else
                {
                    LoadData(CProduct_exten.Active(new DAL()));
                }

                break;

            case ListOption.notactive:

                if (chk_notactive.Checked == true)
                {
                    LoadData(CProduct_exten.NotActive(new DAL()));
                }
                else
                {
                    LoadData(CProduct_exten.Active(new DAL()));
                }

                break;

            case ListOption.Search:
                if (txt_product_name.Text != "")
                {
                    List <Product> list = new List <Product>
                    {
                        CProduct_exten.SearchName(txt_product_name.Text, new DAL())
                    };
                    LoadData(list);
                }
                else
                {
                    LoadData(CProduct_exten.Active(new DAL()));
                }
                break;

            default:
                LoadData(CProduct_exten.Active(new DAL()));
                break;
            }
        }
Esempio n. 5
0
        public void SetAction(BtnEvent pAction, string pPkValue)
        {
            fAction = pAction;

            switch (fAction)
            {
            case BtnEvent.Open:
                btn_save.Text = "&CLOSE";
                obj           = CProduct_exten.PKId(pPkValue, new DAL());
                this.EnableControls(false);
                break;

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

            case BtnEvent.Edit:
                btn_save.Text = "&UPDATE";
                obj           = CProduct_exten.PKId(pPkValue, new DAL());
                this.EnableControls(true);
                break;

            case BtnEvent.Delete:
                btn_save.Text = "CONFIRM\r\n&DELETE";
                obj           = CProduct_exten.PKId(pPkValue, new DAL());
                this.EnableControls(false);
                break;

            case BtnEvent.Print:
                btn_save.Text = "&PRINT";
                obj           = CProduct_exten.PKId(pPkValue, new DAL());
                this.EnableControls(false);
                break;
            }

            this.LoadData();
        }
Esempio n. 6
0
 void txt_product_LookupUpdate(object sender, EventArgs e)
 {
     txt_product_name.LookupList = CProduct_exten.GetforLookup(new DAL());
 }