protected void rp_list_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.CommandName == "change") { string str = e.CommandArgument.ToString(); string strSql = @"SELECT ID , LineName , Description , DataSourceAddress , UserName , PassWord , DataBaseName,IsActive FROM dbo.sys_Line WHERE ID='" + str + "' "; DataSet ds = LineDbHelperSQL.Query(strSql); if (ds != null && ds.Tables[0].Rows.Count > 0) { BLL_Login bll = new BLL_Login(ds.Tables[0].Rows[0]["ID"].ToString()); bll.CreateProjectModel_BaseSys(ds.Tables[0].Rows[0]["ID"].ToString()); Label1.Text = BasePage.CutString(ds.Tables[0].Rows[0]["LineName"].ToString(), 18); Session["leftTree"] = ""; Session["SelectedTestRoomCodes"] = ""; ResultInfo RI = (ResultInfo)Session["UserInfo"]; RI.LineID = ds.Tables[0].Rows[0]["ID"].ToString(); Session["UserInfo"] = RI; new BLL_Login("BaseSystem").CallService("SetUserLineID", "UserID=" + RI.ID + "&LineID=" + RI.LineID + "&Description=" + ds.Tables[0].Rows[0]["Description"].ToString()); } } }
private void UpDataUserLine() { Session["leftTree"] = ""; Session["SelectedTestRoomCodes"] = ""; string strSql = @"SELECT ID , LineName , Description , DataSourceAddress , UserName , PassWord , DataBaseName,IsActive FROM dbo.sys_Line WHERE ID='" + "LineID".RequestStr() + "' AND ISBHZ in (2,3) "; DataSet ds = LineDbHelperSQL.Query(strSql); if (ds != null && ds.Tables[0].Rows.Count > 0) { BLL_Login bll = new BLL_Login(ds.Tables[0].Rows[0]["ID"].ToString()); bll.CreateProjectModel_BaseSys(ds.Tables[0].Rows[0]["ID"].ToString()); Session["leftTree"] = ""; Session["SelectedTestRoomCodes"] = ""; ResultInfo RI = (ResultInfo)Session["UserInfo"]; RI.LineID = ds.Tables[0].Rows[0]["ID"].ToString(); Session["UserInfo"] = RI; new BLL_Login("BaseSystem").CallService("SetUserLineID", "UserID=" + RI.ID + "&LineID=" + RI.LineID + "&Description=" + ds.Tables[0].Rows[0]["Description"].ToString()); } }