Example #1
0
        private void cmbTeamName_SelectedIndexChanged(object sender, EventArgs e)
        {
            Mes_TeamBLL TeamBLL   = new Mes_TeamBLL();
            var         Team_rows = TeamBLL.GetList_Team(" where T_Name = '" + cmbTeamName.Text + "'");

            if (Team_rows.Count > 0)
            {
                cmbTeam.Text = Team_rows[0].T_Code;
            }
        }
 private void cmb_Department_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cmb_Department.Text == "生产车间")
     {
         Mes_TeamBLL TeamBLL = new Mes_TeamBLL();
         var         Teams   = TeamBLL.GetList_Team("");
         cmbTeam.DataSource    = Teams;
         cmbTeam.ValueMember   = "T_Code";
         cmbTeam.DisplayMember = "T_Name";
     }
 }
Example #3
0
        private void loadDroplistData()
        {
            try
            {
                //SysDepartmentBLL departmentbll = new SysDepartmentBLL();
                //var rowss = departmentbll.loadData("");
                //D_Code.DataSource = rows;
                //D_Code.ValueMember = "D_Code";
                //D_Code.DisplayMember = "D_Name";

                AMBaseDepartmentBLL           AMBaseDepartmentBLL = new AMBaseDepartmentBLL();
                List <AMBaseDepartmentEntity> rows = AMBaseDepartmentBLL.GetList_D_Name();
                D_Code.DataSource    = rows;
                D_Code.DisplayMember = "F_FullName";
                // D_Code.ValueMember = "D_Code";

                //if (string.IsNullOrEmpty(department))
                //{
                //    D_Code.SelectedIndex = 0;
                //}
                //else
                //{
                //    D_Code.SelectedValue = department;
                //}


                SysRoleBLL rolebll = new SysRoleBLL();
                var        datas   = rolebll.loadData("");
                R_Code.DataSource    = datas;
                R_Code.ValueMember   = "R_Code";
                R_Code.DisplayMember = "R_Name";

                Mes_TeamBLL TeamBLL = new Mes_TeamBLL();
                var         Teams   = TeamBLL.GetList_Team("");
                cmbTeam.DataSource    = Teams;
                cmbTeam.ValueMember   = "T_Code";
                cmbTeam.DisplayMember = "T_Name";

                //if (string.IsNullOrEmpty(role))
                //{
                //    R_Code.SelectedIndex = 0;
                //}
                //else
                //{
                //    R_Code.SelectedValue = role;
                //}
            }
            catch (Exception ex)
            {
                untCommon.ErrorMsg("用户管理加载数据异常:" + ex.Message);
            }
        }
Example #4
0
        private void frmOrgres_Load(object sender, EventArgs e)
        {
            MesProductOrderHeadBLL ProductOrderHeadBLL = new MesProductOrderHeadBLL();
            var row_ProductOrder = ProductOrderHeadBLL.GetListAll();

            for (int i = 0; i < row_ProductOrder.Count; i++)
            {
                //cmb  .Items.Add(row_ProductOrder[i].W_Code);
                comOrderNo.Items.Add(row_ProductOrder[i].P_OrderNo);
            }

            MesWorkShopBLL WorkShopBLL = new MesWorkShopBLL();
            var            rows        = WorkShopBLL.GetList();

            for (int i = 0; i < rows.Count; i++)
            {
                cmbWorkShop.Items.Add(rows[i].W_Code);
                cmbWorkShopName.Items.Add(rows[i].W_Name);
            }

            if (cmbWorkShop.Items.Contains(Globels.strWorkShop))
            {
                cmbWorkShop.Text = Globels.strWorkShop;
            }

            MesRecordBLL RecordBLL   = new MesRecordBLL();
            var          Record_rows = RecordBLL.GetList();

            for (int i = 0; i < Record_rows.Count; i++)
            {
                cmbRecord.Items.Add(Record_rows[i].R_Record);
                cmbRecordName.Items.Add(Record_rows[i].R_Name);
            }


            Mes_ProceBLL ProceBLL = new Mes_ProceBLL();
            var          row      = ProceBLL.GetList_Proce(" where 1 = 1 ");

            for (int i = 0; i < row.Count; i++)
            {
                cmbProce.Items.Add(row[i].P_ProNo);
                cmbProceName.Items.Add(row[i].P_ProName);
            }
            if (cmbProce.Items.Contains(Globels.strProce))
            {
                cmbProce.Text = Globels.strProce;
            }



            Mes_TeamBLL TeamBLL   = new Mes_TeamBLL();
            var         Team_rows = TeamBLL.GetList_Team(" where 1 = 1 ");

            for (int i = 0; i < Team_rows.Count; i++)
            {
                cmbTeam.Items.Add(Team_rows[i].T_Code);
                cmbTeamName.Items.Add(Team_rows[i].T_Name);
            }
            if (cmbTeam.Items.Contains(Globels.strTeam))
            {
                cmbTeam.Text = Globels.strTeam;
            }

            string strSql = "Select distinct W_SecGoodsName from Mes_WorkShopWeight where W_WorkShopCode = '" + cmbWorkShop.Text + "'";
            Mes_WorkShopWeightBLL WorkShopWeightBL = new Mes_WorkShopWeightBLL();
            DataSet ds   = WorkShopWeightBL.GetList_WorkShop(strSql);
            int     nLen = ds.Tables[0].Rows.Count;

            comboBox1.Items.Clear();
            comboBox1.Items.Add("");
            for (int i = 0; i < nLen; i++)
            {
                comboBox1.Items.Add(ds.Tables[0].Rows[i]["W_SecGoodsName"].ToString());
            }
            Search();
        }