private void PromotionChanged(object sender, System.EventArgs e)
        {
            ACMSDAL.TblProduct product = new ACMSDAL.TblProduct();
            DataTable          table   = product.GetPromotionProductBaseOnPromotionCode(this.lkpEdtItemFreebiePromotionCode.EditValue.ToString(), this.strBranchCode);

            if (table != null)
            {
                DataColumn colChecked = new DataColumn("OutStock", typeof(bool));
                table.Columns.Add(colChecked);

                foreach (DataRow r in table.Rows)
                {
                    r["OutStock"] = false;
                }

                if (table.Rows.Count > 0)
                {
                    this.gridControl1.DataSource = table;
                    this.simpleButton1.Enabled   = true;
                }
                else
                {
                    UI.ShowErrorMessage(this, "No record(s) found", "Error");
                    this.simpleButton1.Enabled = false;
                }
            }
            else
            {
                UI.ShowErrorMessage(this, "No record(s) found", "Error");
                this.simpleButton1.Enabled = false;
            }
        }
Example #2
0
        private void lkpEdtPromotionCode_EditValueChanged(object sender, System.EventArgs e)
        {
            if (lkpEdtPromotionCode.EditValue != null &&
                lkpEdtPromotionCode.Text != "")
            {
                string strPromotionCode = lkpEdtPromotionCode.EditValue.ToString();

                int nPromotionTypeID = (int)lkpEdtPromotionCode.GetColumnValue("nPromotionTypeID");

                // free Product
                if (nPromotionTypeID == 1)
                {
                    xtraTabPage2.PageVisible = true;
                    xtraTabPage1.PageVisible = false;

                    ACMSDAL.TblProduct product = new ACMSDAL.TblProduct();
                    DataTable          table   = product.GetPromotionProductBaseOnPromotionCode(strPromotionCode, myPOS.StrBranchCode);

                    if (table != null)
                    {
                        DataColumn colChecked = new DataColumn("Checked", typeof(bool));
                        table.Columns.Add(colChecked);

                        foreach (DataRow r in table.Rows)
                        {
                            r["Checked"] = false;
                        }
                    }
                    gridControl2.DataSource = table;
                }
                else if (nPromotionTypeID == 2)
                {
                    //Free Package
                    xtraTabPage2.PageVisible = false;
                    xtraTabPage1.PageVisible = true;

                    ACMSLogic.PackageCode package = new ACMSLogic.PackageCode();
                    DataTable             table   = package.GetPromotionPackageBasePromotionCode(strPromotionCode);

                    if (table != null)
                    {
                        DataColumn colChecked = new DataColumn("Checked", typeof(bool));
                        table.Columns.Add(colChecked);

                        foreach (DataRow r in table.Rows)
                        {
                            r["Checked"] = false;
                        }
                    }

                    gridControl1.DataSource = table;
                }
            }
        }
        private void lkpEdtItemFreebiePromotionCode_EditValueChanged(object sender, System.EventArgs e)
        {
            if (lkpEdtItemFreebiePromotionCode.EditValue != null &&
                lkpEdtItemFreebiePromotionCode.Text != "")
            {
                string strPromotionCode = lkpEdtItemFreebiePromotionCode.EditValue.ToString();

                int nPromotionTypeID = (int)lkpEdtItemFreebiePromotionCode.GetColumnValue("nPromotionTypeID");


                {
                    ACMSDAL.TblProduct product = new ACMSDAL.TblProduct();
                    DataTable          table   = product.GetPromotionProductBaseOnPromotionCode(strPromotionCode, myPOS.StrBranchCode);

                    if (table != null)
                    {
                        DataColumn colChecked = new DataColumn("Checked", typeof(bool));
                        table.Columns.Add(colChecked);

                        DataColumn colQty = new DataColumn("nQuantity", typeof(int));
                        table.Columns.Add(colQty);

                        foreach (DataRow r in table.Rows)
                        {
                            r["Checked"]   = false;
                            r["nQuantity"] = 1;
                        }
                    }
                    gridControl2.DataSource = table;


                    ACMSLogic.PackageCode package = new ACMSLogic.PackageCode();
                    DataTable             table2  = package.GetPromotionPackageBasePromotionCode(strPromotionCode);

                    if (table2 != null)
                    {
                        DataColumn colChecked = new DataColumn("Checked", typeof(bool));
                        table2.Columns.Add(colChecked);

                        DataColumn colQty = new DataColumn("nQuantity", typeof(int));
                        table2.Columns.Add(colQty);

                        foreach (DataRow r in table2.Rows)
                        {
                            r["Checked"]   = false;
                            r["nQuantity"] = 1;
                        }
                    }

                    gridControl1.DataSource = table2;
                }
            }
        }
        private void PromotionChanged(object sender, System.EventArgs e)
        {
            ACMSDAL.TblProduct product = new ACMSDAL.TblProduct();
            DataTable table = product.GetPromotionProductBaseOnPromotionCode(this.lkpEdtItemFreebiePromotionCode.EditValue.ToString(), this.strBranchCode);

            if (table != null)
            {
                DataColumn colChecked = new DataColumn("OutStock", typeof(bool));
                table.Columns.Add(colChecked);

                foreach (DataRow r in table.Rows)
                {
                    r["OutStock"] = false;
                }

                if (table.Rows.Count > 0)
                {
                    this.gridControl1.DataSource = table;
                    this.simpleButton1.Enabled = true;
                }
                else
                {
                    UI.ShowErrorMessage(this, "No record(s) found", "Error");
                    this.simpleButton1.Enabled = false;
                }
            }
            else
            {
                UI.ShowErrorMessage(this, "No record(s) found", "Error");
                this.simpleButton1.Enabled = false;
            }
        }
Example #5
0
        private void lkpEdtPromotionCode_EditValueChanged(object sender, System.EventArgs e)
        {
            if (lkpEdtPromotionCode.EditValue != null &&
                lkpEdtPromotionCode.Text != "")
            {
                string strPromotionCode = lkpEdtPromotionCode.EditValue.ToString();

                int nPromotionTypeID = (int)lkpEdtPromotionCode.GetColumnValue("nPromotionTypeID");

                // free Product
                if (nPromotionTypeID == 1)
                {
                    xtraTabPage2.PageVisible = true;
                    xtraTabPage1.PageVisible = false;

                    ACMSDAL.TblProduct product = new ACMSDAL.TblProduct();
                    DataTable table = product.GetPromotionProductBaseOnPromotionCode(strPromotionCode, myPOS.StrBranchCode);

                    if (table != null)
                    {
                        DataColumn colChecked = new DataColumn("Checked", typeof(bool));
                        table.Columns.Add(colChecked);

                        foreach (DataRow r in table.Rows)
                        {
                            r["Checked"] = false;
                        }
                    }
                    gridControl2.DataSource = table;
                }
                else if (nPromotionTypeID == 2)
                {
                    //Free Package
                    xtraTabPage2.PageVisible = false;
                    xtraTabPage1.PageVisible = true;

                    ACMSLogic.PackageCode package = new ACMSLogic.PackageCode();
                    DataTable table = package.GetPromotionPackageBasePromotionCode(strPromotionCode);

                    if (table != null)
                    {
                        DataColumn colChecked = new DataColumn("Checked", typeof(bool));
                        table.Columns.Add(colChecked);

                        foreach (DataRow r in table.Rows)
                        {
                            r["Checked"] = false;
                        }
                    }

                    gridControl1.DataSource = table;
                }
            }
        }
        private void lkpEdtItemFreebiePromotionCode_EditValueChanged(object sender, System.EventArgs e)
        {
            if (lkpEdtItemFreebiePromotionCode.EditValue != null &&
                lkpEdtItemFreebiePromotionCode.Text != "")
            {
                string strPromotionCode = lkpEdtItemFreebiePromotionCode.EditValue.ToString();

                int nPromotionTypeID = (int)lkpEdtItemFreebiePromotionCode.GetColumnValue("nPromotionTypeID");

                {

                    ACMSDAL.TblProduct product = new ACMSDAL.TblProduct();
                    DataTable table = product.GetPromotionProductBaseOnPromotionCode(strPromotionCode, myPOS.StrBranchCode);

                    if (table != null)
                    {
                        DataColumn colChecked = new DataColumn("Checked", typeof(bool));
                        table.Columns.Add(colChecked);

                        DataColumn colQty = new DataColumn("nQuantity", typeof(int));
                        table.Columns.Add(colQty);

                        foreach (DataRow r in table.Rows)
                        {
                            r["Checked"] = false;
                            r["nQuantity"] = 1;
                        }
                    }
                    gridControl2.DataSource = table;

                    ACMSLogic.PackageCode package = new ACMSLogic.PackageCode();
                    DataTable table2 = package.GetPromotionPackageBasePromotionCode(strPromotionCode);

                    if (table2 != null)
                    {
                        DataColumn colChecked = new DataColumn("Checked", typeof(bool));
                        table2.Columns.Add(colChecked);

                        DataColumn colQty = new DataColumn("nQuantity", typeof(int));
                        table2.Columns.Add(colQty);

                        foreach (DataRow r in table2.Rows)
                        {
                            r["Checked"] = false;
                            r["nQuantity"] = 1;
                        }
                    }

                    gridControl1.DataSource = table2;
                }
            }
        }