private void Adruino_Load(object sender, EventArgs e)
        {
            string sql    = "select distinct  machine from t_andruino  order by machine";
            sqlCON conERP = new sqlCON();

            conERP.getComboBoxData(sql, ref cmb_machine);
        }
        private void ProcessForm_Load(object sender, EventArgs e)
        {
            sqlCON connect = new sqlCON();
            string sql     = "select distinct modelcode from m_model order by modelcode";

            connect.getComboBoxData(sql, ref cmb_modelcode);
        }
        private void cmb_modelcode_SelectedIndexChanged(object sender, EventArgs e)
        {
            sqlCON connect = new sqlCON();
            string sql     = "select distinct process from m_pqmdata where model = '" + cmb_modelcode.Text + "' order by process";

            connect.getComboBoxData(sql, ref cmb_processcode);
        }
Esempio n. 4
0
        private void cmb_process_SelectedIndexChanged(object sender, EventArgs e)
        {
            cmb_ip.Items.Clear();
            sqlCON data = new sqlCON();

            data.getComboBoxData("select distinct IPPLC from m_ipPLC where process = '" + cmb_process.Text + "' ", ref cmb_ip);
        }
Esempio n. 5
0
        private void AddERPConfigMail_Load(object sender, EventArgs e)
        {
            sqlCON dept    = new sqlCON();
            string sqldept = "select distinct deptcode from m_dept order by deptcode";

            dept.getComboBoxData(sqldept, ref cmb_deptcode);
            sqlCON function    = new sqlCON();
            string sqlfunction = "select distinct usingfunction from m_email order by usingfunction";

            function.getComboBoxData(sqlfunction, ref cmb_usingfunction);
            cmb_defaultstatus.Items.Add("YES");
            cmb_defaultstatus.Items.Add("NO");
            if (Class.valiballecommon.GetStorage().value1 != null)
            {
                cmb_deptcode.Text        = Class.valiballecommon.GetStorage().value1;
                txt_emailaddress.Text    = Class.valiballecommon.GetStorage().value2;
                cmb_usingfunction.Text   = Class.valiballecommon.GetStorage().value3;
                cmb_defaultstatus.Text   = Class.valiballecommon.GetStorage().value4;
                txt_emailaddress.Enabled = false;
                Class.valiballecommon va = Class.valiballecommon.GetStorage();
                va.value1 = null;
                va.value2 = null;
                va.value3 = null;
                va.value4 = null;

                addupdate = 0;
            }
            else
            {
                addupdate = 1;
            }
        }
        private void ConnectData_Load(object sender, EventArgs e)
        {
            sqlCON connect = new sqlCON();
            string sql     = "select distinct model from m_pqmdata order by model";

            connect.getComboBoxData(sql, ref cmb_modelcode);
        }
Esempio n. 7
0
        private void IPPLC_Load(object sender, EventArgs e)
        {
            btn_delete.Enabled = false;
            btn_edit.Enabled   = false;
            sqlCON data = new sqlCON();

            data.getComboBoxData("select distinct process from m_ipPLC ", ref cmb_process);
        }
        void listserno()
        {
            sqlCON        connect = new sqlCON();
            StringBuilder sql     = new StringBuilder();

            sql.Append("select distinct serno from m_pqmdata where model = '" + cmb_modelcode.Text + "' and process = '" + cmb_processcode.Text + "' and ");
            sql.Append(" cast(inspectdate as datetime) + CAST (inspecttime as datetime) >= '" + dtp_to.Value + "' and  cast(inspectdate as datetime) + CAST (inspecttime as datetime) <'" + dtp_from.Value + "' order by serno");
            connect.getComboBoxData(sql.ToString(), ref cmb_);
        }
        private void PermissionForm_Load(object sender, EventArgs e)
        {
            string sql     = "select distinct permission from m_user order by permission";
            sqlCON connect = new sqlCON();

            connect.getComboBoxData(sql, ref cmb_permission);

            getdgvfull("admin");
        }
        private void AddIPPLC_Load(object sender, EventArgs e)
        {
            sqlCON data = new sqlCON();

            if (Class.valiballecommon.GetStorage().value1 != null)
            {
                if (Class.valiballecommon.GetStorage().value6 == "True")
                {
                    chk_active.Checked = true;
                }
                else
                {
                    chk_active.Checked = false;
                }
                cmb_factory.Text  = Class.valiballecommon.GetStorage().value1;
                cmb_process.Text  = Class.valiballecommon.GetStorage().value2;;
                cmb_line.Text     = Class.valiballecommon.GetStorage().value3;
                txt_modelPLC.Text = Class.valiballecommon.GetStorage().value4;
                cmb_ip.Text       = Class.valiballecommon.GetStorage().value5;
                // chk_active.Enabled = false;
                cmb_ip.Enabled = false;
                Class.valiballecommon va = Class.valiballecommon.GetStorage();
                va.value1 = null;
                va.value2 = null;

                addupdate = 0;
            }
            else
            {
                addupdate = 1;
                data.getComboBoxData("select distinct IPPLC from m_ipPLC", ref cmb_ip);
                data.getComboBoxData("select distinct factory from m_ipPLC", ref cmb_factory);
                data.getComboBoxData(" select distinct process from m_ipPLC", ref cmb_process);
                data.getComboBoxData("select distinct line from m_ipPLC", ref cmb_line);
            }
        }
Esempio n. 11
0
        private void cmb_modelcode_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cmb_modelcode.Text == "")
            {
                return;
            }
            cmb_processcode.Text       = "";
            cmb_processcode.DataSource = null;
            cmb_modelcode.DataSource   = null;

            sqlCON connect = new sqlCON();
            string sql     = "select distinct processcode from m_process where modelcode = '" + cmb_modelcode.Text + "' order by processcode";

            connect.getComboBoxData(sql, ref cmb_processcode);
        }
Esempio n. 12
0
        private void cmb_processcode_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cmb_processcode.Text == "")
            {
                return;
            }
            cmb_itemcode.Text    = "";
            txt_processname.Text = "";
            // txt_processname.Enabled = false;
            cmb_itemcode.DataSource = null;
            sqlCON connect = new sqlCON();
            string sql     = "select distinct itemcode from m_process where modelcode = '" + cmb_modelcode.Text + "' order by itemcode";

            connect.getComboBoxData(sql, ref cmb_itemcode);
            sqlCON processname = new sqlCON();
            string proname     = "select distinct processname from m_process where processcode =  '" + cmb_processcode.Text + "'";

            txt_processname.Text = processname.sqlExecuteScalarString(proname);
        }
Esempio n. 13
0
        private void AddRegisterUser_Load(object sender, EventArgs e)
        {
            string sql     = "select distinct  permission  from m_user ";
            sqlCON connect = new sqlCON();

            connect.getComboBoxData(sql, ref cmb_permission);
            if (Class.valiballecommon.GetStorage().value1 != null)
            {
                txt_usercode.Text    = Class.valiballecommon.GetStorage().value1;
                txt_username.Text    = Class.valiballecommon.GetStorage().value2;
                cmb_permission.Text  = Class.valiballecommon.GetStorage().value3;
                txt_usercode.Enabled = false;
                Class.valiballecommon va = Class.valiballecommon.GetStorage();
                va.value1 = null;
                va.value2 = null;
                va.value3 = null;
                addupdate = 0;
            }
            else
            {
                addupdate = 1;
            }
        }
Esempio n. 14
0
        private void AddProcessForm_Load_2(object sender, EventArgs e)
        {
            sqlCON connect = new sqlCON();
            string sql     = "select distinct modelcode from m_model order by modelcode";

            connect.getComboBoxData(sql, ref cmb_modelcode);
            if (Class.valiballecommon.GetStorage().value1 != null)
            {
                cmb_modelcode.Text      = Class.valiballecommon.GetStorage().value1;
                cmb_processcode.Text    = Class.valiballecommon.GetStorage().value2;
                txt_processname.Text    = Class.valiballecommon.GetStorage().value3;
                cmb_processcode.Enabled = false;
                Class.valiballecommon va = Class.valiballecommon.GetStorage();
                va.value1 = null;
                va.value2 = null;
                va.value3 = null;
                addupdate = 0;
            }
            else
            {
                addupdate = 1;
            }
        }
Esempio n. 15
0
        private void ERPConfigMail_Load(object sender, EventArgs e)
        {
            sqlCON usingfunction = new sqlCON();

            usingfunction.getComboBoxData("select distinct usingfunction from m_email order by usingfunction ", ref cmb_usingfunction);
        }