private static Hashtable GetNewHst(bool CreateNewID, string RESID, string UserID) { Hashtable hst = new Hashtable(); if (CreateNewID) { hst.Add("ID", TimeId.CurrentMilliseconds(30).ToString()); } hst.Add("RESID", RESID); hst.Add("RELID", 0); hst.Add("CRTID", UserID); hst.Add("CRTTIME", DateTime.Now); hst.Add("EDTID", UserID); hst.Add("EDTTIME", DateTime.Now); return(hst); }
protected void Page_Load(object sender, EventArgs e) { KeyWord = Request["keyWordValue"] == null ? "" : Request["keyWordValue"].ToString(); RecID = Request["RecID"] == null ? "" : Request["RecID"].ToString(); NodeID = Request["NodeID"] == null || string.IsNullOrWhiteSpace(Request["NodeID"].ToString()) ? 0 : Convert.ToInt64(Request["NodeID"].ToString()); OpenDiv = Request["OpenDiv"] == null ? "" : Request["OpenDiv"].ToString(); GridID = Request["GridID"] == null ? "CenterGrid" + KeyWord : Request["GridID"].ToString(); ChildGridID = Request["ChildGridID"] == null ? "" : Request["ChildGridID"].ToString(); ActionType = Request["ActionType"] == null ? "" : Request["ActionType"].ToString(); DeptID = Request["DeptID"] == null ? "" : Request["DeptID"].ToString(); DeptID = RecID; if (string.IsNullOrWhiteSpace(ActionType)) { SaveID = TimeId.CurrentMilliseconds(30).ToString(); } else { SaveID = DeptID; } ShowOrder = Common.GetDepartOrder(DeptID, ""); string SelectSql = ""; if (ActionType == "Edit") { SelectSql = "select ID,PID , NAME AS Name ,DEP_TYPE AS [Type] FROM Cms_Department where ID=(SELECT TOP(1) PID FROM Cms_Department WHERE ID='" + DeptID + "')"; } else { SelectSql = "select ID,PID , NAME AS Name ,DEP_TYPE AS [Type] FROM Cms_Department where ID='" + DeptID + "'"; } Dictionary <string, object> QueryValueDic = new Dictionary <string, object>(); QueryValueDic.Add("ID", ""); QueryValueDic.Add("Name", ""); if (Common.GetOneRowValueBySQL(SelectSql, ref QueryValueDic)) { PID = QueryValueDic["ID"].ToString(); PIDName = QueryValueDic["Name"].ToString(); } }
protected void Page_Load(object sender, EventArgs e) { CurrentUserID = CurrentUser.ID; Services Resource = new Services(); ActionType = "XZGL"; ResID = Request["ResID"] == null ? "" : Request["ResID"].ToString(); RecID = Request["RecID"] == null ? "" : Request["RecID"].ToString(); if (Request["SearchType"] != null) { SearchType = Request["SearchType"]; } KeyWord = Request["keyWordValue"] == null ? "" : Request["keyWordValue"].ToString(); NodeID = Request["NodeID"] == null || string.IsNullOrWhiteSpace(Request["NodeID"].ToString()) ? 0 : Convert.ToInt64(Request["NodeID"].ToString()); ActionType = Request["ActionType"] == null ? "" : Request["ActionType"].ToString(); // OpenDiv = Request["OpenDiv"] == null ? "" : Request["OpenDiv"].ToString(); gridID = Request["gridID"] == null ? "" : Request["gridID"].ToString(); DeptID = Request["DeptID"] == null ? "" : Request["DeptID"].ToString(); if (!string.IsNullOrWhiteSpace(DeptID)) { DeptName = Common.GetOneRowValueBySQL("select ID,PID , NAME AS Name ,DEP_TYPE AS [Type] FROM Cms_Department where ID=" + DeptID, "Name"); } else if (!string.IsNullOrWhiteSpace(RecID)) { DeptID = Common.GetOneRowValueBySQL("select * FROM " + Resource.GetTableNameByResourceid(ResID) + " where ID=" + RecID, "DeparmentID"); DeptName = Common.GetOneRowValueBySQL("select ID,PID , NAME AS Name ,DEP_TYPE AS [Type] FROM Cms_Department where ID=" + DeptID, "Name"); } if (string.IsNullOrWhiteSpace(ActionType)) { SaveID = TimeId.CurrentMilliseconds(30).ToString(); } XZRecID = TimeId.CurrentMilliseconds(30).ToString(); if (ActionType == "edit" || !string.IsNullOrWhiteSpace(RecID)) { SaveType = "1"; } UserDefinedSql = "1300";//"select a.id, EMP_ID 账号,EMP_NAME 姓名,EMP_HANDPHONE 联系方式 ,[Status], Sex 性别, EMP_EMAIL 邮箱 , HeadShip 职务, a.[HOST_ID],b.NAME FROM dbo.CMS_EMPLOYEE AS a INNER JOIN dbo.CMS_DEPARTMENT AS b ON a.HOST_ID=b.ID WHERE EMP_ID="; }
protected void Page_Load(object sender, EventArgs e) { CurrentUserID = CurrentUser.ID; ActionType = "XZGL"; ResID = Request["ResID"] == null ? "" : Request["ResID"].ToString(); RecID = Request["RecID"] == null ? "" : Request["RecID"].ToString(); KeyWord = Request["keyWordValue"] == null ? "" : Request["keyWordValue"].ToString(); NodeID = Request["NodeID"] == null || string.IsNullOrWhiteSpace(Request["NodeID"].ToString()) ? 0 : Convert.ToInt64(Request["NodeID"].ToString()); ActionType = Request["ActionType"] == null ? "" : Request["ActionType"].ToString(); // OpenDiv = Request["OpenDiv"] == null ? "" : Request["OpenDiv"].ToString(); gridID = Request["gridID"] == null ? "" : Request["gridID"].ToString(); DeptID = Request["DeptID"] == null ? "" : Request["DeptID"].ToString(); if (!string.IsNullOrWhiteSpace(DeptID)) { DeptName = Common.GetOneRowValueBySQL("select ID,PID , NAME AS Name ,DEP_TYPE AS [Type] FROM Cms_Department where ID=" + DeptID, "Name"); } else if (!string.IsNullOrWhiteSpace(RecID)) { Dictionary <string, object> QueryValueDic = new Dictionary <string, object>(); QueryValueDic.Add("DeptID", ""); QueryValueDic.Add("DeptName", ""); QueryValueDic.Add("IsSysRecID", ""); if (Common.GetOneRowValueBySQL(" SELECT * FROM (SELECT a.id, b.NAME DeptName, a.HOST_ID DeptID, 1 IsSysRecID FROM dbo.CMS_EMPLOYEE AS a INNER JOIN dbo.CMS_DEPARTMENT AS b ON a.HOST_ID = b.id UNION SELECT id, Deparment DeptName, DeparmentID DeptID, 0 FROM dbo.EmployeeInfo) u WHERE id =" + RecID, ref QueryValueDic)) { DeptID = QueryValueDic["DeptID"].ToString(); DeptName = QueryValueDic["DeptName"].ToString(); IsSysRecID = QueryValueDic["IsSysRecID"].ToString(); } } SaveID = TimeId.CurrentMilliseconds(30).ToString(); }