public string Uname() { puku p = new puku(); List <puku> mp = p.Select(" and id=8"); return(mp[0].TURENAME.ToString()); }
private void SetManlist(string strlist) { puku pk = new puku(); List <puku> lpk = pk.Select("and dept in (" + strlist + ") and isStop <>'是'"); List <string> Gys = (from r in lpk select r.TURENAME).ToList(); Msg m = new Msg(Msg._Type.单选, "请选择相关责任人", "责任人", 1, "320/80", "确定/取消", Gys, 4, 120); if (m.Msg_button == "确定") { Wxman = m.Msg_Value_str; info.Text = "维修员:[" + m.Msg_Value_str + "]"; Label gs = Skincss.AddLable(info, "工时:", "right", "160/30", "#100100100", 10, "", 0); TextBox box = Skincss.AddTxt(gs, "Wxgs", "0", "right", "120/30", Skin.upBColor, 18); box.TextChanged += Box_TextChanged; } }
private void SetManlist(string strlist) { info.Text = ""; info.Controls.Clear(); puku pk = new puku(); //下次改写,全局读取用户,然后选择用户,最好提升到系统级别读取用户,因为使用频率非常高。 List <puku> lpk = pk.Select("and dept in (" + strlist + ") and isStop <>'是'"); List <string> Gys = (from r in lpk select r.TURENAME).ToList(); Msg m = new Msg(Msg._Type.单选, "请选择相关责任人", "责任人", 1, "320/80", "确定/取消", Gys, 4, 120); if (m.Msg_button == "确定") { Wxman = m.Msg_Value_str; info.Text = "申请人:[" + m.Msg_Value_str + "]"; if (Is免费) { Label gs = Skincss.AddLable(info, "优惠:", "right", "160/30", "#100100100", 10, "", 0); TextBox box = Skincss.AddTxt(gs, "Wxgs", "0", "right", "120/30", Skin.upBColor, 18); box.TextChanged += Box_TextChanged; } } }
private void Bf_Click(object sender, EventArgs e) { SetCFtxt(sender as Label); List <string> Gys = new List <string>(); if (Dt[0].借用类型 == "新件维修") { Gys.Add("仓库问题"); Gys.Add("售后部门"); Gys.Add("生产部门"); } else { Gys.Add("客户问题"); Gys.Add("售后部门"); Gys.Add("生产部门"); } Msg m = new Msg(Msg._Type.单选, "请选择相关责任部门:", "选择部门", 1, "320/80", "确定/取消", Gys, 4, 120); if (m.Msg_button == "确定") { if (m.Msg_Value_str == "供应商问题") { Wxman = "谷力振"; info.Text = "负责人:[谷力振]"; Ctyp = "采购部"; Cfmen = "供应商"; CfBmn = "供应商问题"; } else if (m.Msg_Value_str == "仓库问题") { Wxman = "卢龙"; info.Text = "责任人:[卢龙]"; Ctyp = "仓库"; Cfmen = "卢龙"; CfBmn = "仓库"; isWc = 1; } else if (m.Msg_Value_str == "售后部门") { Wxman = Dt[0].维修人; info.Text = "负责人:[" + Dt[0].维修人 + "]"; Ctyp = "售后部"; Cfmen = Dt[0].维修人; CfBmn = "售后部"; isWc = 1; } else if (m.Msg_Value_str == "生产部门") { puku pk = new puku(); List <puku> lpk = pk.Select("and dept in ('电器员工', '电器主管', '机械员工', '机械主管') and isStop <>'是'"); List <string> vv = (from r in lpk select r.TURENAME).ToList(); Msg xm = new Msg(Msg._Type.单选, "请选择相关责任人:", "选择责任人", 1, "320/80", "确定/取消", vv, 4, 120); if (xm.Msg_button == "确定") { Wxman = xm.Msg_Value_str; info.Text = "负责人:[" + xm.Msg_Value_str + "]"; Ctyp = "生产部"; Cfmen = xm.Msg_Value_str; CfBmn = "生产部"; isWc = 1; } } else { Wxman = Kf; info.Text = "责任单位:[" + Kf + "]"; Ctyp = m.Msg_Value_str; Cfmen = Kf; CfBmn = "客户问题"; isWc = 3; } } typ = "报废"; }