コード例 #1
0
        private void _GetSettingTime()
        {
            DataTable dt = UpSetting.GetByGroup("OPS");

            if (dt.Rows.Count > 0)
            {
                if (dt.Rows[0]["Value"].ToString() == "OPS2")
                {
                    typeTime = 2;
                    dtTime   = UpSetting.GetByGroup("OPS2");
                }
                else
                {
                    typeTime = 1;
                    DataTable dt0 = UpSetting.GetByGroup("OPS1");
                    if (dt0.Rows.Count > 0)
                    {
                        timeTick = int.Parse(dt0.Rows[0]["Value"].ToString());
                    }
                }
            }
            else
            {
                typeTime = 0;
            }
        }
コード例 #2
0
        private void _LoadSettingTime()
        {
            DataTable dt = UpSetting.GetByGroup("OPS");

            if (dt.Rows.Count > 0)
            {
                if (dt.Rows[0]["Value"].ToString() == "OPS2")
                {
                    checkEdit2.Checked = true;
                }
                else
                {
                    checkEdit1.Checked = true;
                }
            }
            else
            {
                checkEdit1.Checked = true;
            }
            DataTable dt1 = UpSetting.GetByGroup("OPS1");

            if (dt1.Rows.Count > 0)
            {
                calcEditOption1.EditValue = dt1.Rows[0]["Value"].ToString();
            }
            dtTime = UpSetting.GetByGroup("OPS2");
            gridControl3.DataSource = dtTime;
        }
コード例 #3
0
        private void _GetSettingLink()
        {
            DataTable dt  = UpSetting.GetByGroup("LINK");
            string    str = "0,";

            foreach (DataRow dtRow in dt.Rows)
            {
                str = str + dtRow["Value"] + ",";
            }

            str = "(" + str.Trim(',') + ")";

            _WebLink = WebLink.GetIn(str, NumCode.UP);
        }
コード例 #4
0
        private void _LoadWebLinkSettingUp()
        {
            DataTable dt  = UpSetting.GetByGroup("LINKEX");
            string    str = "0,";

            foreach (DataRow dtRow in dt.Rows)
            {
                str = str + dtRow["Value"] + ",";
            }

            str = "(" + str.Trim(',') + ")";

            DTbCTPN = WebLink.GetIn(str, NumCode.UPWEB);
            gridControl1.DataSource = DTbCTPN;
        }
コード例 #5
0
        private void _LoadSettingTime()
        {
            DataTable dt;

            dt = UpSetting.GetByGroup("OPSEX");
            if (dt.Rows.Count > 0)
            {
                if (dt.Rows[0]["Value"].ToString() == "OPS2EX")
                {
                    checkEdit2.Checked = true;
                }
                else
                {
                    checkEdit1.Checked = true;
                }
            }
            else
            {
                checkEdit1.Checked = true;
            }
            dt = UpSetting.GetByGroup("OPS1EX");
            if (dt.Rows.Count > 0)
            {
                calcEditOption1.EditValue = dt.Rows[0]["Value"].ToString();
            }
            dtTime = UpSetting.GetByGroup("OPS2EX");
            gridControl3.DataSource = dtTime;
            dt = UpSetting.GetByGroup("NUMTHEX");
            if (dt.Rows.Count > 0)
            {
                calcEditNumThread.EditValue = dt.Rows[0]["Value"].ToString();
            }
            dt = UpSetting.GetByGroup("SLEEPEX");
            if (dt.Rows.Count > 0)
            {
                calcEditSleep.EditValue = dt.Rows[0]["Value"].ToString();
            }
        }
コード例 #6
0
 private void _GetSettingContent()
 {
     dtContent = UpSetting.GetByGroup("MESS");
 }
コード例 #7
0
        private void btnLuu_Click(object sender, EventArgs e)
        {
            UpSetting.Delete("LINKEX");
            foreach (DataRow dtRow in DTbCTPN.Rows)
            {
                try
                {
                    UpSetting up = new UpSetting();
                    up.Value = dtRow["ID"].ToString();
                    up.Group = "LINKEX";
                    UpSetting.Insert(up);
                }
                catch { }
            }
            UpSetting.Delete("OPSEX");
            UpSetting up0 = new UpSetting();

            if (checkEdit1.Checked)
            {
                up0.Value = "OPS1EX";
            }
            else
            {
                up0.Value = "OPS2EX";
            }
            up0.Group = "OPSEX";
            UpSetting.Insert(up0);

            UpSetting.Delete("OPS1EX");
            UpSetting up1 = new UpSetting();

            up1.Value = calcEditOption1.Value.ToString();
            up1.Group = "OPS1EX";
            UpSetting.Insert(up1);

            UpSetting.Delete("OPS2EX");
            foreach (DataRow dtRow in dtTime.Rows)
            {
                try
                {
                    UpSetting up2 = new UpSetting();
                    up2.Value = dtRow["value"].ToString();
                    up2.Group = "OPS2EX";
                    UpSetting.Insert(up2);
                }
                catch { }
            }
            UpSetting.Delete("MESSEX");
            foreach (DataRow dtRow in dtContent.Rows)
            {
                try
                {
                    UpSetting upm = new UpSetting();
                    upm.Value = dtRow["value"].ToString();
                    upm.Group = "MESSEX";
                    UpSetting.Insert(upm);
                }
                catch { }
            }
            UpSetting.Delete("NUMTHEX");
            UpSetting num = new UpSetting();

            num.Value = calcEditNumThread.Value.ToString();
            num.Group = "NUMTHEX";
            UpSetting.Delete("SLEEPEX");
            UpSetting.Insert(num);
            UpSetting sleep = new UpSetting();

            sleep.Value = calcEditSleep.Value.ToString();
            sleep.Group = "SLEEPEX";
            UpSetting.Insert(sleep);
            MessageBox.Show("Đã lưu thông tin thiết lập up tự động.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
コード例 #8
0
 private void _LoadSettingContent()
 {
     dtContent = UpSetting.GetByGroup("MESSEX");
     gridControl4.DataSource = dtContent;
 }
コード例 #9
0
        private void btnLuu_Click(object sender, EventArgs e)
        {
            UpSetting.Delete("LINK");
            foreach (DataRow dtRow in DTbCTPN.Rows)
            {
                try
                {
                    UpSetting up = new UpSetting();
                    up.Value = dtRow["ID"].ToString();
                    up.Group = "LINK";
                    UpSetting.Insert(up);
                }
                catch { }
            }
            UpSetting.Delete("OPS");
            UpSetting up0 = new UpSetting();

            if (checkEdit1.Checked)
            {
                up0.Value = "OPS1";
            }
            else
            {
                up0.Value = "OPS2";
            }
            up0.Group = "OPS";
            UpSetting.Insert(up0);

            UpSetting.Delete("OPS1");
            UpSetting up1 = new UpSetting();

            up1.Value = calcEditOption1.EditValue.ToString();
            up1.Group = "OPS1";
            UpSetting.Insert(up1);

            UpSetting.Delete("OPS2");
            foreach (DataRow dtRow in dtTime.Rows)
            {
                try
                {
                    UpSetting up2 = new UpSetting();
                    up2.Value = dtRow["value"].ToString();
                    up2.Group = "OPS2";
                    UpSetting.Insert(up2);
                }
                catch { }
            }
            UpSetting.Delete("MESS");
            foreach (DataRow dtRow in dtContent.Rows)
            {
                try
                {
                    UpSetting upm = new UpSetting();
                    upm.Value = dtRow["value"].ToString();
                    upm.Group = "MESS";
                    UpSetting.Insert(upm);
                }
                catch { }
            }

            MessageBox.Show("Đã lưu thông tin up tự động.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            DialogResult = DialogResult.OK;
        }