Example #1
0
        private void Progress_Load(object sender, EventArgs e)
        {
            cmbVendor.Properties.BeginUpdate();
            ComboxData data = new ComboxData();

            data.Text  = "";
            data.Value = "";
            cmbVendor.Properties.Items.Add(data);
            TonerGlobal.LoadCmbVendor(cmbVendor);
            cmbVendor.Properties.EndUpdate();
        }
        private void TonerDetail_Load(object sender, EventArgs e)
        {
            cmbMakeVendor.Properties.BeginUpdate();

            ComboxData data = new ComboxData();

            data.Text  = "";
            data.Value = "";
            cmbMakeVendor.Properties.Items.Add(data);
            TonerGlobal.LoadCmbVendor(cmbMakeVendor);

            cmbMakeVendor.Properties.EndUpdate();



            cmbVendor.Properties.BeginUpdate();

            ComboxData data2 = new ComboxData();

            data2.Text  = "";
            data2.Value = "";
            cmbVendor.Properties.Items.Add(data2);
            TonerGlobal.LoadCmbUseVendor(cmbVendor, false);

            cmbVendor.Properties.EndUpdate();

            //if (!PaCSGlobal.LoginUserInfo.Venderid.Equals("C660"))
            //{
            //    cmbVendor.Properties.ReadOnly = true;
            //    cmbVendor.Text = PaCSGlobal.LoginUserInfo.Vendername;
            //}
            //else
            //{
            //    cmbVendor.SelectedIndex = 0;
            //}

            cmbStatus.Properties.BeginUpdate();

            ComboxData data3 = new ComboxData();

            data3.Text  = "";
            data3.Value = "";
            cmbStatus.Properties.Items.Add(data3);
            TonerGlobal.LoadBoxCaseStatus(cmbStatus);

            cmbStatus.Properties.EndUpdate();

            dateEditFrom.Text = PaCSGlobal.GetServerDateTimeRange("-", -7);
            dateEditTo.Text   = PaCSGlobal.GetServerDateTime(3);
        }
Example #3
0
        /// <summary>
        /// 碳粉生产厂家
        /// </summary>
        /// <param name="cmb"></param>
        public static void LoadCmbVendor(ComboBoxEdit cmb)
        {
            //cmb.Properties.Items.Clear();
            string    sqlVendor = "select vend_code,vend_nm,vend_nm_cn from pacsm_md_vend where instr(','||vend_func||',',',TONER_MAKE_VEND,') > 0 and fct_code = '" + PaCSGlobal.LoginUserInfo.Fct_code + "' ";
            DataTable dtVendor  = OracleHelper.ExecuteDataTable(sqlVendor);

            for (int i = 0; i < dtVendor.Rows.Count; i++)
            {
                ComboxData data = new ComboxData();
                data.Text  = dtVendor.Rows[i]["vend_nm_cn"].ToString();
                data.Value = dtVendor.Rows[i]["vend_code"].ToString();
                cmb.Properties.Items.Add(data);
            }
        }
Example #4
0
        /// <summary>
        /// 厂家Line信息
        /// </summary>
        /// <param name="cmb"></param>
        /// <param name="vendCode"></param>
        public static void LoadLineByBufferCode(ComboBoxEdit cmb, string buffer)
        {
            cmb.Properties.Items.Clear();
            DataTable dtVendor = GetVendorLineByBuffer(buffer);

            for (int i = 0; i < dtVendor.Rows.Count; i++)
            {
                ComboxData data = new ComboxData();
                data.Text  = dtVendor.Rows[i]["line_nm"].ToString();
                data.Value = dtVendor.Rows[i]["line_code"].ToString();
                cmb.Properties.Items.Add(data);
            }
            cmb.SelectedIndex = -1;
        }
Example #5
0
        /// <summary>
        /// 运输状态
        /// </summary>
        /// <param name="cmb"></param>
        /// <param name="vendCode"></param>
        public static void LoadBoxCaseStatus(ComboBoxEdit cmb)
        {
            //cmb.Properties.Items.Clear();
            StringBuilder sqlVendor = new StringBuilder("select comm_code code,comm_code_nm name from pacsc_md_comm_code " +
                                                        " where  type_code ='PACS_BOX_CASE_STATUS' " +
                                                        " and fct_code = '" + PaCSGlobal.LoginUserInfo.Fct_code + "' ");

            DataTable dtVendor = OracleHelper.ExecuteDataTable(sqlVendor.ToString());

            for (int i = 0; i < dtVendor.Rows.Count; i++)
            {
                ComboxData data = new ComboxData();
                data.Text  = dtVendor.Rows[i]["name"].ToString();
                data.Value = dtVendor.Rows[i]["code"].ToString();
                cmb.Properties.Items.Add(data);
            }
            cmb.SelectedIndex = -1;
        }
Example #6
0
        /// <summary>
        /// 碳粉使用厂家(其他,不包括登录者厂家)
        /// </summary>
        /// <param name="cmb"></param>
        public static void LoadCmbUseVendor(ComboBoxEdit cmb, bool except)
        {
            //cmb.Properties.Items.Clear();
            StringBuilder sqlVendor = new StringBuilder("select vend_code,vend_nm,vend_nm_cn from pacsm_md_vend where instr(','||vend_func||',',',TONER_USE_VEND,') > 0 and fct_code = '" + PaCSGlobal.LoginUserInfo.Fct_code + "' ");

            if (except)
            {
                sqlVendor.Append(" and vend_code != '" + PaCSGlobal.LoginUserInfo.Venderid + "'");
            }
            DataTable dtVendor = OracleHelper.ExecuteDataTable(sqlVendor.ToString());

            for (int i = 0; i < dtVendor.Rows.Count; i++)
            {
                ComboxData data = new ComboxData();
                data.Text  = dtVendor.Rows[i]["vend_nm_cn"].ToString();
                data.Value = dtVendor.Rows[i]["vend_code"].ToString();
                cmb.Properties.Items.Add(data);
            }
            cmb.SelectedIndex = -1;
        }