private void btnExcel_Click(object sender, System.EventArgs e) { string strDate = ""; if (this.txtBeginDate.Text == "") { strDate = DateTime.Now.ToString("yyyy-MM-dd"); } else { strDate = this.txtBeginDate.Text; } //导出EXCEL DataTable dtGoodsType = GetData(this.ddlDept.SelectedValue, this.ddlDept.SelectedItem.Text, strDate); string strGoodsType = this.ExportTable(dtGoodsType); //体 //Session["QUERY"] = dtGoodsType; //头 string strCaption = "<table style='font-size:X-Small' border=1 bordercolor=gray>"; strCaption += "<tr><td align=center colspan=9>" + CommonStatic.EnterpriseFullName() + "</td></tr>"; strCaption += "<tr><td align=center colspan=9>油料收、支、存动态月报表</td></tr>"; strCaption += "<tr><td align=left colspan=4>填报单位:" + this.ddlDept.SelectedItem.Text + "</td><td align=left colspan=5>填报日期:" + strDate + ""; strCaption += "</table>"; //Session["ExcelCaption"] = strCaption; //脚 string strBottom = "<table style='font-size:X-Small' border=1 bordercolor=gray>"; strBottom += "<tr ><td align=left colspan=3>单位主管:</td>"; strBottom += "<td align=left colspan=3>审核:</td>"; strBottom += "<td align=left colspan=3>制表:</td></tr>"; strBottom += "</table>"; //Session["ExcelBottom"] = strBottom; this.ExportToXls(this, "油料收、支、存动态月报表", strCaption + strGoodsType + strBottom); }
private void btnExcel_Click(object sender, System.EventArgs e) { //导出EXCEL //体 DataTable dtMember = GetData(txtCompanyName.Text, ddlDept.SelectedValue, this.txtBeginDate.Text, this.txtEndDate.Text, ddlState.SelectedValue, txtLicenseTag.Text, txtCardID.Text); string strMember = this.ExportTable(dtMember); //Session["QUERY"] = dtMember; //头 string strCaption = "<table style='font-size:X-Small' border=1 bordercolor=gray>"; strCaption += "<tr><td align=center colspan=10>" + CommonStatic.EnterpriseFullName() + "</td></tr>"; strCaption += "<tr><td align=center colspan=10>会员清单</td></tr>"; strCaption += "<tr><td align=center colspan=10>" + DateTime.Now.ToString("yyyy年MM月dd日") + "</td></tr>"; strCaption += "</table>"; //Session["ExcelCaption"] = strCaption; //脚 string strBottom = "<table style='font-size:X-Small' border=1 bordercolor=gray>"; strBottom += "<tr>"; strBottom += "<td align=center colspan=3>部门主管:</td>"; strBottom += "<td align=center colspan=3>审核:</td>"; strBottom += "<td align=center colspan=4>制表:</td></tr>"; strBottom += "</table>"; //Session["ExcelBottom"] = strBottom; this.ExportToXls(this, "会员清单", strCaption + strMember + strBottom); }
private void btnOperName_Click(object sender, System.Web.UI.ImageClickEventArgs e) { //修改用户名称 Oper oper = (Oper)Session[ConstValue.LOGIN_USER_SESSION]; try { oper.cnvcOperName = txtOperName.Text; Dept curDept = Session[ConstValue.LOGIN_DEPT_SESSION] as Dept; Oper curOper = Session[ConstValue.LOGIN_USER_SESSION] as Oper; BusiLog busiLog = new BusiLog(); busiLog.cndOperDate = DateTime.Now; busiLog.cnnSerial = Guid.NewGuid(); busiLog.cnvcOperName = curOper.cnvcOperName; busiLog.cnvcComments = "修改操作员名称:" + oper.cnvcOperName; busiLog.cnvcDeptID = curDept.cnvcDeptID; busiLog.cnvcDeptName = curDept.cnvcDeptName; busiLog.cnvcOperType = "BS006"; busiLog.cnvcSource = "网站"; OperFacade.UpdatePwd(oper, busiLog); CommonStatic.LoadOperDictionary(); Session[ConstValue.LOGIN_USER_SESSION] = oper; Popup("用户名称已修改!"); } catch (BusinessException bex) { Popup(bex.Message); return; } }
// Hàm xử lý nếu có user connect private void UserConnect(string connectId, string name) { using (var db = new OZChatDbContext()) { var user = db.HubUsers.FirstOrDefault(p => p.UserName == name); Connection oConnection = new Connection(); if (user.Connected != true) { Clients.Others.connect(connectId, name, user.FullName, user.ID); oConnection.UserID = user.ID; oConnection.ConnectionID = connectId; db.Connection.Add(oConnection); user.Connected = true; db.SaveChanges(); CommonStatic.AddOnlineUser(user); } else { Clients.Others.connect(connectId, name, user.FullName, user.ID); oConnection.UserID = user.ID; oConnection.ConnectionID = connectId; db.Connection.Add(oConnection); db.SaveChanges(); CommonStatic.AddOnlineUser(user); } GetAllGroup(); GetAllUser(); GetAllMessageUser(); JoinRoom(); } }
private void btnExcel_Click(object sender, System.EventArgs e) { //导出EXCEL //体 DataTable dtBillOfMove = this.GetData(this.ddlDeliveryCompany.SelectedValue, this.ddlProvideCompany.SelectedValue, this.txtBeginDate.Text, this.txtEndDate.Text); dtBillOfMove.Columns.Remove("修改"); string strBillOfMove = this.ExportTable(dtBillOfMove); //Session["QUERY"] = dtBillOfMove; //头 string strCaption = "<table style='font-size:X-Small' border=1 bordercolor=gray>"; strCaption += "<tr><td align=center colspan=13>" + CommonStatic.EnterpriseFullName() + "</td></tr>"; strCaption += "<tr><td align=center colspan=13>储备库柴油调拨明细报表</td></tr>"; strCaption += "<tr><td align=left colspan=13>填报单位:</td></tr>"; strCaption += "</table>"; //Session["ExcelCaption"] = strCaption; //脚 string strBottom = "<table style='font-size:X-Small' border=1 bordercolor=gray>"; strBottom += "<tr>"; strBottom += "<td align=center colspan=3>单位主管:</td>"; strBottom += "<td></td>"; strBottom += "<td colspan=3>业务主管:</td>"; strBottom += "<td align=center colspan=3>审核:</td>"; strBottom += "<td colspan=3>制表:</td></tr>"; strBottom += "<tr><td colspan=13 align=right>编制日期:" + DateTime.Now.ToString("yyyy年MM月dd日") + "</td></tr></table>"; //Session["ExcelBottom"] = strBottom; this.ExportToXls(this, "储备库柴油调拨明细报表", strCaption + strBillOfMove + strBottom); }
// ------------ PRIVATE MESSAGE -------------------- // Hàm lấy ra tất cả tin nhắn giữa bạn và 1 user nào đó public async Task getAllMessagePrivate(string userId) { var id = Context.User.Identity.GetUserId(); var connectId = Context.ConnectionId; using (var db = new OZChatDbContext()) { var messagePrivates = db.MessagePrivates .Where(p => (p.FromID == id && p.ReceiveID == userId) || p.FromID == userId && p.ReceiveID == id).OrderByDescending(p => p.ID).Take(50).ToList(); await Clients.Caller.messagePrivates(messagePrivates.OrderBy(p => p.ID).ToList(), id); var userMessage = db.UserMessagePrivates.FirstOrDefault(p => p.FromUserID == userId && p.RecieveUserID == id); if (userMessage != null) { Clients.Caller.devCountMessagePrivate(userId, userMessage.NewMessage); userMessage.NewMessage = 0; db.SaveChanges(); } //Kiểm tra user bạn muốn tương tác có đang online không var onlineUser = CommonStatic.OnlineUsers.FirstOrDefault(p => p.ID == userId); CommonStatic.RemoveInteractives(id); if (onlineUser != null) { //Nếu có thì thêm vào danh sách tương tác Clients.Caller.userInteractive(userId, true); CommonStatic.AddInteractive(id, userId); } } removeInteracGroup(); }
private void btnExcel_Click(object sender, System.EventArgs e) { //导出EXCEL //体 //Session["QUERY"] = dtConsItem; DataTable dtConsItem = GetData(this.ddlDept.SelectedValue, this.txtBeginDate.Text, this.txtEndDate.Text); string strConsItem = this.ExportTable(dtConsItem); //头 string strCaption = "<table style='font-size:X-Small' border=1 bordercolor=gray>"; strCaption += "<tr><td align=center colspan=14>" + CommonStatic.EnterpriseFullName() + "</td></tr>"; strCaption += "<tr><td align=center colspan=14>" + ddlDept.SelectedItem.Text + "零售油销售汇总表</td></tr>"; strCaption += "<tr><td align=center colspan=14>" + DateTime.Now.ToString("yyyy年MM月dd日") + "</td></tr>"; strCaption += "<tr><td align=left colspan=3></td><td colspan=3></td><td align=center>金额单位:元</td></tr>"; strCaption += "</table>"; //Session["ExcelCaption"] = strCaption; //脚 string strBottom = "<table style='font-size:X-Small' border=1 bordercolor=gray>"; strBottom += "<tr><td></td>"; strBottom += "<td align=center>部门主管:</td>"; strBottom += "<td></td><td></td>"; strBottom += "<td align=center>审核:</td>"; strBottom += "<td></td><td>制表:</td></tr>"; strBottom += "<tr><td colspan=14>本表一式三份,物资公司财务一份,物资公司业务一份,各电站业务留存一份。</td></tr></table>"; //Session["ExcelBottom"] = strBottom; this.ExportToXls(this, ddlDept.SelectedItem.Text + "零售油销售汇总表", strCaption + strConsItem + strBottom); }
// Hàm xử lý nếu có user disconnect private void UserDisConnect(string connectId, string name) { using (var db = new OZChatDbContext()) { var user = db.HubUsers.FirstOrDefault(p => p.UserName == name); if (user.Connected == true) { Clients.Others.disConnect(name, user.FullName, user.ID); var listConnection = db.Connection.Where(p => p.UserID == user.ID).ToList(); Boolean isRemoveConnection = false; for (var i = 0; i < listConnection.Count(); i++) { if (listConnection[i].ConnectionID == connectId) { db.Connection.Remove(listConnection[i]); isRemoveConnection = true; } } if (isRemoveConnection == true && listConnection.Count == 1) { user.Connected = false; } db.SaveChanges(); if (isRemoveConnection == true && listConnection.Count == 1) { CommonStatic.RemoveOnlineUser(user.ID); } CommonStatic.RemoveInteractives(user.ID); CommonStatic.RemoveInteracGroup(user.ID); } } //LeaveRoom(); }
private void btnExcel_Click(object sender, System.EventArgs e) { //导出EXCEL //体 string strDeliveryCompanyFact = ""; string strContractNoFact = ""; DataTable dtBillOfMaterials = GetData(this.ddlDept.SelectedValue, this.ddlDept.SelectedItem.Text, this.txtBeginDate.Text, this.txtEndDate.Text, this.txtDeliveryCompany.Text, this.txtContractNo.Text, ref strDeliveryCompanyFact, ref strContractNoFact); dtBillOfMaterials.Columns.Remove("修改"); string strBillOfMaterials = this.ExportTable(dtBillOfMaterials); //Session["QUERY"] = dtBillOfMaterials; //头 string strCaption = "<table style='font-size:X-Small' border=1 bordercolor=gray>"; strCaption += "<tr><td align=center colspan=11>" + CommonStatic.EnterpriseFullName() + "</td></tr>"; strCaption += "<tr><td align=center colspan=11>" + ddlDept.SelectedItem.Text + "专供柴油销售明细表</td></tr>"; strCaption += "<tr><td align=center colspan=11>" + DateTime.Now.ToString("yyyy年MM月dd日") + "</td></tr>"; strCaption += "<tr><td align=left colspan=4>" + "领用单位:" + strDeliveryCompanyFact + "</td><td colspan=4>合同编号:" + strContractNoFact + "</td><td align=center colspan=2>金额单位:元</td><td></td></tr>"; strCaption += "</table>"; //Session["ExcelCaption"] = strCaption; //脚 string strBottom = "<table style='font-size:X-Small' border=1 bordercolor=gray>"; strBottom += "<tr><td></td>"; strBottom += "<td align=center colspan=2>部门主管:</td>"; strBottom += "<td></td><td></td>"; strBottom += "<td align=center colspan=2>审核:</td>"; strBottom += "<td></td><td colspan=2>制表:</td><td></td></tr>"; strBottom += "<tr><td colspan=11>本表一式四份,物资公司财务一份(附领料单),物资公司业务一份,一份与供货发票一并转领用单位(附领料单),各电站业务留存一份(附领料单)。</td></tr></table>"; //Session["ExcelBottom"] = strBottom; this.ExportToXls(this, ddlDept.SelectedItem.Text + "专供柴油销售明细表", strCaption + strBillOfMaterials + strBottom); }
public static void FillTree(TreeView tv, bool haveOper) { DataTable dtOper = ReportQueryFacade.CommonQuery("select * from tbOper order by cnvcOpername"); //"OperFacade.GetAllOper(); DataTable dtDept = ReportQueryFacade.CommonQuery("select * from tbDept order by cnvcDeptName"); //OperFacade.GetAllDept(); //最高级部门 TreeNode tnTop = new TreeNode(); tnTop.ID = "dept_00"; tnTop.Type = "dept"; tnTop.Text = CommonStatic.EnterpriseFullName(); if (haveOper) { DataRow[] drOpers = dtOper.Select("cnvcDeptID=00"); foreach (DataRow drOper in drOpers) { Oper oper = new Oper(drOper); TreeNode tnOper = OperNode(oper); tnTop.Nodes.Add(tnOper); } } //一级部门 DataRow[] drDepts = dtDept.Select("cnvcParentDeptID=00"); foreach (DataRow drDept in drDepts) { Dept dept = new Dept(drDept); TreeNode tnDept = DeptNode(dept); FillNode(dtDept, dtOper, tnDept, dept.cnvcDeptID, haveOper); tnTop.Nodes.Add(tnDept); } tv.Nodes.Add(tnTop); }
public void removeInteracPrivate() { string userId = Context.User.Identity.GetUserId(); Clients.Caller.userInteractive(userId, false); CommonStatic.RemoveInteractives(userId); }
private void Page_Load(object sender, System.EventArgs e) { // 页面加载事件处理 this.WebSiteTitle = CommonStatic.WebSiteTitle(); if (!Page.IsPostBack) { // 如果条一次加载页面 //this.tblAvi.Visible = false; // 置登录成功进入管理动画为不可见 //用户信息置空 this.tbxAdminUser.Text = ""; this.tbxAdminPass.Text = ""; } }
private void btnExcel_Click(object sender, System.EventArgs e) { if (this.txtflag.Text == "FillFee") { DataTable dtFillFee = GetFillFee(); dtFillFee.Columns.Remove("cnnSerial"); dtFillFee.Columns.Remove("cnvcCompanyID"); dtFillFee.Columns["cnvcCompanyName"].ColumnName = "单位名称"; dtFillFee.Columns.Remove("cnvcAcctID"); dtFillFee.Columns["cnnFillFee"].ColumnName = "充值金额"; dtFillFee.Columns["cnvcOperName"].ColumnName = "操作员"; dtFillFee.Columns["cndOperDate"].ColumnName = "操作时间"; dtFillFee.Columns.Remove("cnvcDeptID"); dtFillFee.Columns["cnvcDeptName"].ColumnName = "指定加油站"; //体 //Session["QUERY"] = dtFillFee; string strFillFee = this.ExportTable(dtFillFee); //头 string strCaption = "<table style='font-size:X-Small' border=1 bordercolor=gray>"; strCaption += "<tr><td align=center colspan=5>" + CommonStatic.EnterpriseFullName() + "</td></tr>"; strCaption += "<tr><td align=center colspan=5>充值明细表</td></tr>"; strCaption += "<tr><td align=center colspan=5>" + DateTime.Now.ToString("yyyy年MM月dd日") + "</td></tr>"; strCaption += "</table>"; //Session["ExcelCaption"] = strCaption; this.ExportToXls(this, "充值明细表", strCaption + strFillFee); } else { DataTable dtCompany = GetCompany(); dtCompany.Columns.Remove("cnvcCompanyID"); dtCompany.Columns["cnvcCompanyName"].ColumnName = "单位名称"; dtCompany.Columns.Remove("cnvcAcctID"); dtCompany.Columns["cnnPrepayFee"].ColumnName = "余额"; dtCompany.Columns.Remove("cnvcDeptID"); dtCompany.Columns["cnvcDeptName"].ColumnName = "指定加油站"; dtCompany.Columns.Remove("cnnFillFee"); dtCompany.Columns["cnnFillFeeSum"].ColumnName = "充值合计"; //体 //Session["QUERY"] = dtCompany; string strCompany = this.ExportTable(dtCompany); //头 string strCaption = "<table style='font-size:X-Small' border=1 bordercolor=gray>"; strCaption += "<tr><td align=center colspan=4>" + CommonStatic.EnterpriseFullName() + "</td></tr>"; strCaption += "<tr><td align=center colspan=4>加油卡单位余额明细表</td></tr>"; strCaption += "<tr><td align=center colspan=4>" + DateTime.Now.ToString("yyyy年MM月dd日") + "</td></tr>"; strCaption += "</table>"; //Session["ExcelCaption"] = strCaption; this.ExportToXls(this, "加油卡单位余额明细表", strCaption + strCompany); } }
private void btnExcel_Click(object sender, System.EventArgs e) { //导出EXCEL //体 DataTable dtConsItem = GetData(this.ddlDept.SelectedValue, this.txtBeginDate.Text, this.txtEndDate.Text, this.txtOperName.Text, this.ddlOperType.SelectedValue); string strConsItem = this.ExportTable(dtConsItem); //Session["QUERY"] = dtConsItem; //头 string strCaption = "<table style='font-size:X-Small' border=1 bordercolor=gray>"; strCaption += "<tr><td align=center colspan=10>" + CommonStatic.EnterpriseFullName() + "</td></tr>"; strCaption += "<tr><td align=center colspan=10>" + ddlDept.SelectedItem.Text + "库存日志明细表</td></tr>"; strCaption += "<tr><td align=center colspan=10>" + DateTime.Now.ToString("yyyy年MM月dd日") + "</td></tr>"; strCaption += "</table>"; //Session["ExcelCaption"] = strCaption; this.ExportToXls(this, ddlDept.SelectedItem.Text + "库存日志明细表", strCaption + strConsItem); }
void LoadDept() { Dept getDept = new Dept(); getDept.cnvcDeptID = this.txtDeptID.Text; Dept dept = DeptFacade.GetDept(getDept); if (dept != null) { hidParentID.Value = dept.cnvcParentDeptID; txtDeptName.Text = dept.cnvcDeptName; chkValidate.Checked = dept.cnbValidate; } if (this.txtDeptID.Text == "0") { hidParentID.Value = "0"; txtDeptName.Text = CommonStatic.EnterpriseFullName(); } }
private void Page_Load(object sender, System.EventArgs e) { // 页面加载事件处理 this.WebSiteTitle = CommonStatic.WebSiteTitle(); string strJavaScript = "<script language='javascript'>" + "window.resizeTo(640,480);" + "window.moveTo(screen.availWidth/2-320,screen.availHeight/2-240);" + "function FullScreen()" + "{" + "window.moveTo(0,0);" + "window.resizeTo(screen.availWidth,screen.availHeight);" + "var thewindow = window.open('Login.aspx', '_top');" + "thewindow.focus(); " + "}" + "setTimeout('FullScreen()',5000);" + "</script>"; // 客户端代码声明,该代码完成开起全屏登录窗口 Page.RegisterClientScriptBlock("FullScreen", strJavaScript); // 注入代码 }
private void btnExcel_Click(object sender, System.EventArgs e) { //导出EXCEL //体 string strGoodsName = ddlGoodsName.SelectedItem.Text; if (strGoodsName == "所有") { strGoodsName = "%"; } string strDeliveryCompanyFact = ""; string strProvideCompanyFact = ""; DataTable dtBillOfValidate = GetData(this.ddlDeliveryCompany.SelectedValue, this.ddlProvideCompany.SelectedValue, this.txtDeliveryBeginDate.Text, this.txtDeliveryEndDate.Text, this.txtProvideBeginDate.Text, this.txtProvideEndDate.Text, ddlGoodsType.SelectedValue, strGoodsName, ref strDeliveryCompanyFact, ref strProvideCompanyFact, txtBillNo.Text); dtBillOfValidate.Columns.Remove("修改"); //Session["QUERY"] = dtBillOfValidate; string strBillOfValidate = this.ExportTable(dtBillOfValidate); //头 string strCaption = "<table style='font-size:X-Small' border=1 bordercolor=gray>"; strCaption += "<tr><td align=center colspan=15>" + CommonStatic.EnterpriseFullName() + "</td></tr>"; strCaption += "<tr><td align=center colspan=15>油料验收明细</td></tr>"; strCaption += "<tr><td align=left colspan=5>" + "供油单位:" + strProvideCompanyFact + "</td><td></td><td colspan=5>收油单位:" + strDeliveryCompanyFact + "</td><td></td><td colspan=2></td><td align=center>单位:kg</td></tr>"; strCaption += "</table>"; //Session["ExcelCaption"] = strCaption; //脚 string strBottom = "<table style='font-size:X-Small' border=1 bordercolor=gray>"; strBottom += "<tr><td colspan=15 rospan=4>公里运输损耗的计算:公路运输定额损耗按《中石化成品油计量管理标准》规定执行,即GB11085-89之规定:50公里以下损耗为0.01%;运距每增加50公里,损耗增加0.01;不足50公里按50公里计算。甲方按乙方起运油库至糯扎渡中心油库运距,承担定额运输损耗;超出定额损耗部分由乙方承运人与甲方收货人双方签字确认,按思茅市翠云区中石化加油站挂牌零售价由甲方从乙方结算运费中扣抵。</td></tr></table>"; // strBottom += "<td align=center>部门主管:</td>"; // strBottom += "<td></td><td></td>"; // strBottom += "<td align=center>审核:</td>"; // strBottom += "<td></td><td>制表:</td><td></td></tr>"; // strBottom += "<tr><td colspan=8>本表一式四份,物资公司财务一份(附领料单),物资公司业务一份,一份与供货发票一并转领用单位(附领料单),各电站业务留存一份(附领料单)。</td></tr></table>"; //Session["ExcelBottom"] = strBottom; this.ExportToXls(this, "油料验收明细", strCaption + strBillOfValidate + strBottom); }
private void btnOK_Click(object sender, System.Web.UI.ImageClickEventArgs e) { //添加用户 try { if (txtOperID.Text.Length == 0 || txtOperName.Text.Length == 0) { throw new BusinessException("AddOper", "不能为空!"); } if (GetLength(txtOperID.Text) > 8) { throw new BusinessException("", "操作员ID过长!"); } if (GetLength(txtOperName.Text) > 20) { throw new BusinessException("", "操作员姓名过长!"); } Oper oper = new Oper(); oper.cnvcOperName = txtOperID.Text; Oper oldOper = OperFacade.GetOper(oper); if (oldOper == null) { oper.cnvcOperName = txtOperName.Text; oper.cnvcPwd = "666666"; //OperFacade.AddOper(oper); Popup("新建用户成功!"); } else { Popup("用户已存在!"); } CommonStatic.LoadOperDictionary(); } catch (BusinessException bex) { Popup(bex.Message); } }
//Hàm lấy ra toàn bộ tin nhắn của 1 nhóm public async Task getAllGroupMessage(int groupId) { var userId = Context.User.Identity.GetUserId(); using (var db = new OZChatDbContext()) { var messages = db.MessageGroups.Where(p => p.GroupID == groupId).OrderByDescending(p => p.ID).Take(50).ToList(); await Clients.Caller.allGroupMessage(messages.OrderBy(p => p.ID).ToList(), userId); var newMessage = db.NewMessageGroups.FirstOrDefault(p => p.UserID == userId && p.GroupID == groupId); if (newMessage != null) { await Clients.Caller.devCountMessageGroup(groupId, newMessage.Count); db.NewMessageGroups.Remove(newMessage); db.SaveChanges(); } } // Xóa tương tác cũ sau đó thêm tương tác mới CommonStatic.RemoveInteracGroup(userId); CommonStatic.AddInteracGroup(userId, groupId); removeInteracPrivate(); }
public void removeInteracGroup() { string userId = Context.User.Identity.GetUserId(); CommonStatic.RemoveInteracGroup(userId); }
private void Page_Load(object sender, System.EventArgs e) { #region 设置所有菜单为隐藏 tblUserInfo.Visible = false; tblOilReports.Visible = false; tblOilTotalReports.Visible = false; tblOilListReports.Visible = false; tblMemberReports.Visible = false; tblSysManage.Visible = false; #endregion #region 显示当前登录用户信息 //Session.RemoveAll(); if (Session[ConstValue.LOGIN_USER_SESSION] != null) { Oper operCurrent = Session[ConstValue.LOGIN_USER_SESSION] as Oper; //this.lblUserId.Text = operCurrent.cnvcOperName; this.lblUserName.Text = operCurrent.cnvcOperName; Hashtable lstDept = new Hashtable(); DataTable tblDept = DeptFacade.GetAllDept(); foreach (DataRow row in tblDept.Rows) { Dept objDept = new Dept(row); if (null == lstDept[objDept.cnvcDeptID]) { lstDept.Add(objDept.cnvcDeptID, objDept); } } Dept topDept = new Dept(); topDept.cnvcDeptName = CommonStatic.EnterpriseShortName(); topDept.cnvcDeptID = "00"; lstDept.Add(topDept.cnvcDeptID, topDept); //Hashtable lstDept = Application[ConstValue.DEPT_DICTI_NAME] as Hashtable; Dept deptCurrent = lstDept[operCurrent.cnvcDeptID] as Dept; this.lblDeptName.Text = deptCurrent.cnvcDeptName; Session[ConstValue.LOGIN_DEPT_SESSION] = deptCurrent; } else { this.lblDeptName.Text = ""; this.lblUserName.Text = ""; //this.lblAddDate.Text = ""; //this.lblLoginTime.Text = ""; //this.lblLoginCount.Text = ""; return; } #endregion #region 控制当前显示菜单 string strShowMenuID = String.Empty; if (null != Request[ConstValue.SHOW_MENU_ARGS]) { strShowMenuID = Request[ConstValue.SHOW_MENU_ARGS].ToString(); } switch (strShowMenuID) { case "tblOilReports": case "tblOilTotalReports": case "tblOilListReports": case "tblMemberReports": case "tblSysManage": System.Web.UI.HtmlControls.HtmlTable tblCurrent = this.FindControl(strShowMenuID) as HtmlTable; tblCurrent.Visible = true; SetMenuShowByUserPurview(tblCurrent, tblCurrent, Session[ConstValue.LOGIN_USER_PURVIEW_SESSION] as ArrayList); break; } tblUserInfo.Visible = true; #endregion }
private void Page_Load(object sender, System.EventArgs e) { this.WebSiteTitle = CommonStatic.WebSiteTitle(); }