protected void Page_Load(object sender, EventArgs e) { int count = 0; if (!IsPostBack) { string CB_No = Common.Constants.getReqValue(Request, "CB_No"); if (CB_No == "") model = new Model.TB_RC_CompanyBasic(); else { model = cbdb.GetModel(int.Parse(CB_No)); if (model != null) { var list = tcdb.GetModelListByRelate(CB_No); foreach (var tc in list) { count++; selectstr += GetTalentOptionReadonly(tc.TC_No); } /*for (int i = count; i < 10; i++) { selectstr += GetTalentOptionReadonly(-1); }*/ } else model = new Model.TB_RC_CompanyBasic(); } } }
/*增加公司*/ public static int AddLabelCompanyDialog(HttpRequest req, ref string message,ref int id) { string tmp = ""; Model.TB_RC_CompanyBasic model = new Model.TB_RC_CompanyBasic(); model.CB_X = Common.Constants.getReqValue(req, "CB_X"); model.CB_Y = Common.Constants.getReqValue(req, "CB_Y"); model.CB_Name = Common.Constants.getReqValue(req, "CB_Name"); model.CB_Province = Common.Constants.getReqValue(req, "CB_Province"); tmp = Common.Constants.getReqValue(req, "CB_Num"); if (tmp != "") model.CB_Num = int.Parse(tmp); model.CB_Position = Common.Constants.getReqValue(req, "CB_Position"); model.CB_SetUp =Common.Constants.getReqValue(req, "CB_SetUp"); model.CB_Des = Common.Constants.getReqValue(req, "CB_Des"); if (model.CB_X == "" || model.CB_Y == "") { message = "坐标为空,不能加入"; return Common.Constants.ERR; } message = "增加公司成功"; id = cbdb.Add(model); return Common.Constants.OK; }
protected void Page_Load(object sender, EventArgs e) { int count = 0; if (!IsPostBack) { var tmp = Common.Constants.getNullToString(Tools.SessionHelper.Get("userid")); if (tmp == "") per = new Model.TB_RC_Permission(); else per = pidb.GetModel(tmp); string CB_No = Common.Constants.getReqValue(Request, "CB_No"); if (CB_No == "") model = new Model.TB_RC_CompanyBasic(); else { model = cbdb.GetModel(int.Parse(CB_No)); if (model != null) { var list = tcdb.GetModelListByRelate(CB_No); foreach (var tc in list) { if (per.PM_Level >= 1) { if (count<5) selectstr += GetTalentOption(tc.TC_No); else selectstr2 += GetTalentOption(tc.TC_No); } else { if (count <5) selectstr += GetTalentOptionReadonly(tc.TC_No); else selectstr2 += GetTalentOptionReadonly(tc.TC_No); } count++; } for (int i = count; i < 10; i++) { if (per.PM_Level >= 1) { if(i<5) selectstr += GetTalentOption(-1); else selectstr2 += GetTalentOption(-1); } else { if(i<5) selectstr += GetTalentOptionReadonly(-1); else selectstr2 += GetTalentOptionReadonly(-1); } } } else model = new Model.TB_RC_CompanyBasic(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { var tmp = Common.Constants.getNullToString(Tools.SessionHelper.Get("userid")); if (tmp == "") per = new Model.TB_RC_Permission(); else per = pidb.GetModel(tmp); string CB_No = Common.Constants.getReqValue(Request, "CB_No"); if (CB_No == "") model = new Model.TB_RC_CompanyBasic(); else { model = cbdb.GetModel(int.Parse(CB_No)); } } }