示例#1
0
 private void initConfig(String saleId)
 {
     lc = new LottoryControl();
     s  = new Sale();
     setControl(saleId);
     //setGrdRate();
 }
示例#2
0
        private void initConfig(String sfCode, String thooTranferId)
        {
            ComboBoxItem cbo = new ComboBoxItem();

            String monthId = "";

            lc                   = new LottoryControl();
            sf                   = lc.sfdb.selectByCode(sfCode);
            thoD                 = lc.thodb.selectByDefault();
            thoTranfer           = lc.thodb.selectByPk(thooTranferId);
            cbo.Value            = thoTranfer.Id;
            cbo.Text             = thoTranfer.Name;
            cboThoo              = lc.thodb.getCboThoo(cboThoo);
            cboThoo.SelectedItem = cboThoo;
            cboThoo.Text         = thoTranfer.Name;
            monthId              = System.DateTime.Now.Month.ToString("00");
            if ((System.DateTime.Now.Day >= 2) && (System.DateTime.Now.Day <= 17))
            {
                cboPeriod.SelectedValue = "02";
            }
            else
            {
                cboPeriod.SelectedValue = "01";
            }

            cboMonth  = lc.cf.setCboMonth(cboMonth);
            cboPeriod = lc.cf.setCboPeriod(cboPeriod);
            //cboStaff = lc.sfdb.getCboStaff(cboStaff);

            cboMonth.SelectedValue = monthId;
            cboYear = lc.cf.setCboYear(cboYear);
            setHGrdLotto();
            setDGrdLotto();
        }
示例#3
0
 private void initConfig(String sfId)
 {
     lc = new LottoryControl();
     s  = new Staff();
     s  = lc.selectStaffbyPk(sfId);
     setControl(s.Id);
 }
示例#4
0
        private void initConfig(String sfCode, LottoryControl l)
        {
            pageLoad    = true;
            pB1.Visible = false;
            String monthId = "", periodId = "";

            lc = l;
            sf = lc.sfdb.selectByCode(sfCode);

            fbd = new FolderBrowserDialog();
            fbd.SelectedPath = lc.initC.pathImageBefore;
            iL    = new ImageList();
            name  = new List <String>();
            name1 = new List <String>();

            monthId = System.DateTime.Now.Month.ToString("00");

            cboMonth  = lc.cf.setCboMonth(cboMonth);
            cboPeriod = lc.cf.setCboPeriod(cboPeriod);
            //cboStaff = lc.sfdb.getCboStaff(cboStaff);

            cboMonth.SelectedValue = monthId;
            cboYear   = lc.cf.setCboYear(cboYear);
            cboPeriod = lc.setCboPeriodDefault(cboPeriod);
            cboSale   = lc.saledb.getCboSale(cboSale);
            cboThoo   = lc.thodb.getCboThoo(cboThoo);
            getImage();
            //pageLoad = false;
        }
示例#5
0
 public FrmInputAdjust(String sfCode, LottoryControl l)
 {
     pageLoad = true;
     InitializeComponent();
     initConfig(sfCode, l);
     pageLoad = false;
 }
示例#6
0
 public FrmInputImage(String sfCode, LottoryControl l, Boolean StatusCheck, Boolean StatusCheck2)
 {
     pageLoad = true;
     InitializeComponent();
     initConfig(sfCode, l, StatusCheck, StatusCheck2);
     pageLoad = false;
 }
示例#7
0
        public FrmLottoThoo(String sfCode, String rowId, String thooid, LottoryControl l)
        {
            InitializeComponent();
            thooId = thooid;

            initConfig(sfCode, rowId, l);
        }
示例#8
0
        private void initConfig(String sfCode, LottoryControl l, String rId)
        {
            pageLoad = true;
            rw       = new Reward();
            String monthId = "", periodId = "";

            //cf = new Config1();
            //lc = new LottoryControl();
            lc = l;
            sf = lc.sfdb.selectByCode(sfCode);
            //lc.sfdb.sf = sf;
            monthId = System.DateTime.Now.Month.ToString("00");
            //if ((System.DateTime.Now.Day >= 2) && (System.DateTime.Now.Day <= 17))
            //{
            //    cboPeriod.SelectedValue = "02";
            //}
            //else
            //{
            //    cboPeriod.SelectedValue = "01";
            //}

            cboMonth  = lc.cf.setCboMonth(cboMonth);
            cboPeriod = lc.cf.setCboPeriod(cboPeriod);
            cboStaff  = lc.sfdb.getCboStaff(cboStaff);
            cboPeriod = lc.setCboPeriodDefault(cboPeriod);
            cboMonth.SelectedValue = monthId;
            cboYear = lc.cf.setCboYear(cboYear);
            ComboBoxItem cbo = new ComboBoxItem();

            cbo.Value     = sf.Id;
            cbo.Text      = sf.Name;
            cboStaff.Text = sf.Name;
            setControl(rId);
            pageLoad = false;
        }
示例#9
0
 private void initConfig(Form f, String sfCode, LottoryControl l)
 {
     //lc = new LottoryControl();
     lc  = l;
     frm = f;
     sf  = lc.sfdb.selectByCode(sfCode);
     tvMain();
 }
示例#10
0
 private void initConfig(String sfCode)
 {
     lc      = new LottoryControl();
     tho     = lc.thodb.selectByDefault();
     sf      = lc.sfdb.selectByCode(sfCode);
     cboThoo = lc.thodb.getCboThooAll(cboThoo);
     //ComboBoxItem cbo = new ComboBoxItem();
     //cbo.Value = tho.Id;
     //cbo.Text = tho.Name;
     cboThoo.Text = tho.Name;
 }
示例#11
0
        private void initConfig(String sfCode, LottoryControl l, String nlId)
        {
            String monthId = "", periodId = "";

            lc        = l;
            sf        = lc.sfdb.selectByCode(sfCode);
            monthId   = System.DateTime.Now.Month.ToString("00");
            cboMonth  = lc.cf.setCboMonth(cboMonth);
            cboPeriod = lc.cf.setCboPeriod(cboPeriod);
            cboYear   = lc.cf.setCboYear(cboYear);
            cboMonth.SelectedValue = monthId;
            cboPeriod = lc.setCboPeriodDefault(cboPeriod);
            setControl(nlId);
        }
示例#12
0
        private void initConfig(String sfCode, LottoryControl l)
        {
            rw      = new Reward();
            cboThoo = new ComboBox();

            cItem = new ComboBoxItem();
            String monthId = "", periodId = "";

            lc      = l;
            cboThoo = lc.thodb.getCboThoo(cboThoo);
            sf      = lc.sfdb.selectByCode(sfCode);
            //lc.sfdb.sf = sf;
            monthId = System.DateTime.Now.Month.ToString("00");

            cboMonth  = lc.cf.setCboMonth(cboMonth);
            cboPeriod = lc.cf.setCboPeriod(cboPeriod);
            //cboStaff = lc.sfdb.getCboStaff(cboStaff);

            cboMonth.SelectedValue = monthId;
            cboYear   = lc.cf.setCboYear(cboYear);
            cboPeriod = lc.setCboPeriodDefault(cboPeriod);

            setControl();
            setGrid(dgv1);
            //setGrid(dgv3);
            setGrdThoo();
            setGrdRate();
            dgv1.ReadOnly           = true;
            dgvThooTranfer.ReadOnly = true;
            dgvRate.ReadOnly        = true;
            txtAmt.ReadOnly         = true;
            txtDown.ReadOnly        = true;
            txtUp.ReadOnly          = true;
            txtTod.ReadOnly         = true;
            txtTho.ReadOnly         = true;
            txtNetTotal.ReadOnly    = true;
            setGrd2();
            if (dgv1.Rows.Count > 1)
            {
                btnSearch.Enabled = false;
                btnSave.Enabled   = false;
                btnVoid.Visible   = true;
            }
            else
            {
                btnVoid.Visible = false;
            }
            pB1.Visible = false;
            //dgvRate.Hide();
        }
示例#13
0
        private void initConfig(String sfCode, LottoryControl l, Boolean statuscheck, Boolean statuscheck2)
        {
            pB1.Visible  = false;
            StatusCheck  = statuscheck;     // เอาไว้ check ว่ามาจากหน้าจอ Input หรือ หน้าจอ Check
            StatusCheck2 = statuscheck2;    // เอาไว้ check ว่ามาจากหน้าจอ Input หรือ หน้าจอ Check
            if (StatusCheck)
            {
                this.Text = "ตรวจสอบ ป้อนข้อมูลจากรูป";
            }
            else
            {
                this.Text = "ป้อนข้อมูลจากรูป";
            }
            img = new Image1();
            String monthId = "", periodId = "";

            lc        = l;
            sf        = lc.sfdb.selectByCode(sfCode);
            tho       = lc.thodb.selectByDefault();
            monthId   = System.DateTime.Now.Month.ToString("00");
            cboMonth  = lc.cf.setCboMonth(cboMonth);
            cboPeriod = lc.cf.setCboPeriod(cboPeriod);
            cboStaff  = lc.sfdb.getCboStaff(cboStaff);
            cboSale   = lc.saledb.getCboSale(cboSale);
            cboSale1  = cboSale;
            cboThoo   = lc.thodb.getCboThoo(cboThoo);
            cboMonth.SelectedValue = monthId;
            cboYear = lc.cf.setCboYear(cboYear);
            ComboBoxItem cbo = new ComboBoxItem();

            cbo.Value         = sf.Id;
            cbo.Text          = sf.Name;
            cboStaff.Text     = sf.Name;
            cboThoo.Text      = tho.Name;
            cboPeriod         = lc.setCboPeriodDefault(cboPeriod);
            picRotate.Visible = false;
            picZoomM.Visible  = false;
            picZoomP.Visible  = false;
            picHand.Visible   = false;
            lotNew            = true;
            clearGrd1         = false;

            setGrid1();
            viewImage();

            setResize();
            btnEdit.Enabled = false;
        }
示例#14
0
        private void initConfig(String sfCode, String rowId, LottoryControl l)
        {
            lot      = new Lotto();
            lc       = l;
            cboThoo  = lc.thodb.getCboThoo(cboThoo);
            cboStaff = lc.sfdb.getCboStaff(cboStaff);
            cboSale  = lc.saledb.getCboSale(cboSale);
            //cboThoo = lc.cboThoo;
            //cboStaff = lc.cboStaff;
            //cboSale = lc.cboSale;

            cboMonth  = lc.cf.setCboMonth(cboMonth);
            cboPeriod = lc.cf.setCboPeriod(cboPeriod);
            cboYear   = lc.cf.setCboYear(cboYear);
            setControl(rowId);
        }
示例#15
0
 private void initConfig(String sfCode, LottoryControl l, String yearId, String monthId, String periodId)
 {
     pageLoad = true;
     //String monthId = "";
     lc = l;
     //lc = new LottoryControl();
     //monthId = System.DateTime.Now.Month.ToString("00");
     sf = lc.sfdb.selectByCode(sfCode);
     CreateMyBorderlessWindow();
     cboMonth  = lc.cf.setCboMonth(cboMonth);
     cboPeriod = lc.cf.setCboPeriod(cboPeriod);
     cboMonth.SelectedValue = monthId;
     cboYear = lc.cf.setCboYear(cboYear);
     cboYear.SelectedIndex   = cboYear.FindStringExact(yearId);
     cboPeriod.SelectedValue = periodId;
     //cboPeriod = lc.setCboPeriodDefault(cboPeriod);
     //setControl(yearId, monthId, periodId, rateId);
     //this.Opacity = 20;
     pageLoad = false;
 }
示例#16
0
        private void initConfig(String sfCode, LottoryControl l)
        {
            String monthId = "", periodId = "";

            //cf = new Config1();
            //lc = new LottoryControl();
            lc  = l;
            sf  = lc.sfdb.selectByCode(sfCode);
            tho = lc.thodb.selectByDefault();
            //lc.sfdb.sf = sf;
            monthId = System.DateTime.Now.Month.ToString("00");

            setGrid1();
            setGridLotto(1);

            //setGrid2();
            //setGrid3();
            cboMonth  = lc.cf.setCboMonth(cboMonth);
            cboPeriod = lc.cf.setCboPeriod(cboPeriod);
            cboStaff  = lc.sfdb.getCboStaff(cboStaff);
            cboSale   = lc.saledb.getCboSale(cboSale);
            cboSale1  = cboSale;
            cboThoo   = lc.thodb.getCboThoo(cboThoo);
            cboMonth.SelectedValue = monthId;
            cboYear = lc.cf.setCboYear(cboYear);
            ComboBoxItem cbo = new ComboBoxItem();

            cbo.Value     = sf.Id;
            cbo.Text      = sf.Name;
            cboStaff.Text = sf.Name;
            cboThoo.Text  = tho.Name;
            lotNew        = true;
            clearGrd1     = false;

            btnEdit.Enabled = false;
            btnEditColor    = btnEdit.BackColor;
            cboPeriod       = lc.setCboPeriodDefault(cboPeriod);
            setGridLot();
            label18.Text = "";
        }
示例#17
0
        private void initConfig(String sfCode, LottoryControl l)
        {
            pageLoad = true;
            rw       = new Reward();
            String monthId = "", periodId = "";

            cboThoo = new ComboBox();
            cboSale = new ComboBox();
            //cf = new Config1();
            //lc = new LottoryControl();
            lc      = l;
            sf      = lc.sfdb.selectByCode(sfCode);
            cboThoo = lc.thodb.getCboThoo(cboThoo);
            cboSale = lc.saledb.getCboSale(cboSale);
            //lc.sfdb.sf = sf;
            monthId = System.DateTime.Now.Month.ToString("00");
            //if ((System.DateTime.Now.Day >= 2) && (System.DateTime.Now.Day <= 17))
            //{
            //    cboPeriod.SelectedValue = "02";
            //}
            //else
            //{
            //    cboPeriod.SelectedValue = "01";
            //}

            cboMonth  = lc.cf.setCboMonth(cboMonth);
            cboPeriod = lc.cf.setCboPeriod(cboPeriod);
            //cboStaff = lc.sfdb.getCboStaff(cboStaff);

            cboMonth.SelectedValue = monthId;
            cboYear   = lc.cf.setCboYear(cboYear);
            cboPeriod = lc.setCboPeriodDefault(cboPeriod);
            //setGrid(dgv1);
            //setControl1();
            //setControl1();
            pageLoad    = false;
            pB1.Visible = false;
        }
示例#18
0
        private void initConfig(String sfCode, LottoryControl l)
        {
            pageLoad = true;
            String monthId = "", periodId = "";

            lc = l;
            sf = lc.sfdb.selectByCode(sfCode);
            //lc.sfdb.sf = sf;
            monthId = System.DateTime.Now.Month.ToString("00");
            if ((System.DateTime.Now.Day >= 2) && (System.DateTime.Now.Day <= 17))
            {
                cboPeriod.SelectedValue = "02";
            }
            else
            {
                cboPeriod.SelectedValue = "01";
            }
            cboMonth  = lc.cf.setCboMonth(cboMonth);
            cboPeriod = lc.cf.setCboPeriod(cboPeriod);
            cboStaff  = lc.sfdb.getCboStaff(cboStaff);
            cboSale   = lc.saledb.getCboSale(cboSale);
            cboMonth.SelectedValue = monthId;
            cboYear   = lc.cf.setCboYear(cboYear);
            cboPeriod = lc.setCboPeriodDefault(cboPeriod);
            ComboBoxItem cbo = new ComboBoxItem();

            cbo.Value       = sf.Id;
            cbo.Text        = sf.Name;
            cboStaff.Text   = sf.Name;
            gBLotto.Visible = false;
            gBLot.Visible   = false;
            setGrdLotto();
            setGrid1();
            setDataGrdLotto();
            pageLoad = false;
            btnLotUnActive.Visible = false;
            btnSaveApprove.Visible = false;
        }
示例#19
0
        private void initConfig(String sfCode, LottoryControl l)
        {
            pB1.Visible = false;
            img         = new Image1();
            String monthId = "", periodId = "";

            lc                     = l;
            sf                     = lc.sfdb.selectByCode(sfCode);
            tho                    = lc.thodb.selectByDefault();
            monthId                = System.DateTime.Now.Month.ToString("00");
            cboMonth               = lc.cf.setCboMonth(cboMonth);
            cboPeriod              = lc.cf.setCboPeriod(cboPeriod);
            cboStaff               = lc.sfdb.getCboStaff(cboStaff);
            cboSale                = lc.saledb.getCboSale(cboSale);
            cboSaleNew             = lc.saledb.getCboSale(cboSaleNew);
            cboSale1               = cboSale;
            cboThoo                = lc.thodb.getCboThoo(cboThoo);
            cboMonth.SelectedValue = monthId;
            cboYear                = lc.cf.setCboYear(cboYear);
            ComboBoxItem cbo = new ComboBoxItem();

            cbo.Value         = sf.Id;
            cbo.Text          = sf.Name;
            cboStaff.Text     = sf.Name;
            cboThoo.Text      = tho.Name;
            cboPeriod         = lc.setCboPeriodDefault(cboPeriod);
            picRotate.Visible = false;
            picZoomM.Visible  = false;
            picZoomP.Visible  = false;
            picHand.Visible   = false;
            lotNew            = true;
            clearGrd1         = false;

            setGrid1();
            viewImage();
            btnEdit.Enabled = false;
        }
示例#20
0
 private void initConfig()
 {
     lc  = new LottoryControl();
     tho = new Thoo();
 }
示例#21
0
 private void initConfig()
 {
     lc   = new LottoryControl();
     rate = new Rate();
 }
示例#22
0
 public FrmInputApprove(String sfCode, LottoryControl l)
 {
     InitializeComponent();
     initConfig(sfCode, l);
 }
示例#23
0
 public FrmNumberLimitAdd(String sfCode, LottoryControl l, String nlId)
 {
     InitializeComponent();
     initConfig(sfCode, l, nlId);
 }
示例#24
0
 private void initConfig(String sfId)
 {
     lc = new LottoryControl();
     s  = new Staff();
     setControl(sfId);
 }
示例#25
0
 private void initConfig()
 {
     //MessageBox.Show("aaa", "FrmLogin");
     lc = new LottoryControl();
     //MessageBox.Show("bbb", "FrmLogin");
 }
示例#26
0
 public FrmLottoSummarySale(String sfCode, String yearId, String monthId, String periodId, String rateId, LottoryControl l)
 {
     InitializeComponent();
     initConfig(sfCode, l, yearId, monthId, periodId);
 }
示例#27
0
 public FrmLottoSummary(String sfCode, LottoryControl l)
 {
     InitializeComponent();
     initConfig(sfCode, l);
     pageLoad = false;
 }
示例#28
0
        private void initConfig(String sfCode, LottoryControl l)
        {
            String monthId = "", periodId = "";
            lc = l;
            sf = lc.sfdb.selectByCode(sfCode);
            monthId = System.DateTime.Now.Month.ToString("00");
            cboMonth = lc.cf.setCboMonth(cboMonth);
            cboPeriod = lc.cf.setCboPeriod(cboPeriod);
            cboMonth.SelectedValue = monthId;
            cboYear = lc.cf.setCboYear(cboYear);
            cboPeriod = lc.setCboPeriodDefault(cboPeriod);
            if (lc.initC.clearInput.Equals("yes"))
            {
                chkClearInput.Checked = true;
            }
            else
            {
                chkClearInput.Checked = false;
            }
            if (lc.initC.StatusServer.Equals("yes"))
            {
                ChkServer.Checked = true;
                gBServer.Visible = true;
                ChkClient.Checked = false;
                gBClient.Visible = false;

                chkConnectServer.Checked = true;
                txtHost.Text = lc.initC.ServerIP;
                txtUser.Text = lc.initC.User;
                txtPwd.Text = lc.initC.Password;
                txtDatabase.Text = lc.initC.Database;
                txtDatabase.Visible = true;
                txtHost.Visible = true;
                txtPwd.Visible = true;
                txtUser.Visible = true;
            }
            else
            {
                ChkServer.Checked = false;
                gBServer.Visible = false;
                ChkClient.Checked = true;
                gBClient.Visible = true;

                chkConnectServer.Checked = false;
                txtDatabase.Visible = false;
                txtHost.Visible = false;
                txtPwd.Visible = false;
                txtUser.Visible = false;
            }

            txtPathImage.Text = lc.initC.pathImage;
            txtPathBefore.Text = lc.initC.pathImageBefore;
            if (lc.initC.delImage.Equals("yes"))
            {
                chkDelImage.Checked = true;
            }
            else
            {
                chkDelImage.Checked = false;
            }
        }
示例#29
0
 public FrmLottoImage(String sfCode, LottoryControl l)
 {
     InitializeComponent();
     initConfig(sfCode, l);
 }
示例#30
0
 private void initConfig()
 {
     lc = new LottoryControl();
     //dt = lc.selectStaffAll();
 }