示例#1
0
        /// <summary>
        /// 获取权限树
        /// </summary>
        /// <returns></returns>
        public List <ZtreeNode_ORG> GetOrgs2Tree()
        {
            var all      = DalUser.GetUserORG(UserState.UserID);
            var hallall  = DaoHall.FindList();
            var staffall = DaoStaff.FindList();

            foreach (var org in all.Where(obj => obj.PAR_ORG_ID == ""))
            {
                org.PAR_ORG_ID = null;
            }
            var treelist = all.Where(obj => obj.ORG_LEVEL == 2)//市级
                           .Select(obj => new ZtreeNode_ORG
            {
                id   = obj.ORG_ID.ToString(),
                name = obj.ORG_NAM
            }).ToList();

            foreach (var leaf in treelist)
            {
                List <ZtreeNode_ORG> leafchild = new List <ZtreeNode_ORG>();
                GenOrgs2Tree(all, staffall, hallall, ref leafchild, leaf.id);
                leaf.children = leafchild;
            }
            return(treelist);
        }
示例#2
0
 public ActionResult Release_Partial(int mt, string org)
 {
     if (mt == 1)
     {
         ViewBag.STAFFLIST = new SelectList(DaoStaff.FindList("STAFF_ID asc", "ORG_ID", org), "STAFF_ID", "STAFF_NAM");
         return(PartialView("Partial/Release_STAFF"));
     }
     if (mt == 2)
     {
         var hall = DaoHall.GetEntity("ORG_ID", org);
         if (null != hall)
         {
             ViewBag.COUNTERLIST = new SelectList(DaoCounter.FindList("COUNTER_ID asc", "HALL_NO", hall.HALL_NO)
                                                  , "COUNTER_ID", "COUNTER_ID");
         }
         return(PartialView("Partial/Release_COUNTER"));
     }
     if (mt == 3)
     {
         var hall = DaoHall.GetEntity("ORG_ID", org);
         if (null != hall)
         {
             ViewBag.TABLELIST = new SelectList(DaoTable.FindList("", "HALL_NO", hall.HALL_NO), "TABLE_CD", "TABLE_NAM");
         }
         return(PartialView("Partial/Release_TABLE"));
     }
     return(Redirect("/Home/Error"));
 }
示例#3
0
        public bool authenticate(string strUsername, string strPassword, string strDeviceImei)
        {
            DaoStaff  daoStaff          = new DaoStaff();
            DaoDevice daoDevice         = new DaoDevice();
            bool      blnAccountIsValid = daoStaff.authenticate(strUsername, strPassword);
            bool      blnDeviceIsValid  = daoDevice.getDeviceByImeiNumber(strDeviceImei) != null;

            return(blnAccountIsValid && blnDeviceIsValid);
        }
示例#4
0
        protected void btnNew_Click(object sender, EventArgs e)
        {
            pnlCreateForm.Visible = true;
            pnlDevice.Visible     = false;

            DaoStaff daoStaff = new DaoStaff();

            ddlStaff.DataSource     = daoStaff.getAllStaff();
            ddlStaff.DataTextField  = "Username";
            ddlStaff.DataValueField = "StaffId";
            ddlStaff.DataBind();

            ddlStaff.Items.Insert(0, new ListItem("Select Staff", "0"));
            ddlStaff.SelectedIndex = 0;
        }
示例#5
0
        public ActionResult Delete(string id)
        {
            try
            {
                var deleteId = id.Split(',');
                foreach (var dId in deleteId)
                {
                    var info = dao.GetEntity("HALL_NO", dId);
                    if (null == info)
                    {
                        LogHelper.ErrorLog("系统错误");
                        return(Redirect("/Home/Error"));
                    }
                    if (DaoStaff.Exists("ORG_ID", info.ORG_ID))
                    {
                        Alter("不允许删除,该服务厅还存在员工!", util.Enum.AlterTypeEnum.Error, true);
                        return(RedirectToAction("/"));
                    }
                    if (DaoTicketQuSerial.Exists("Q_SYSNO", info.HALL_NO))
                    {
                        Alter("不允许删除,该服务厅还存在取号队列!", util.Enum.AlterTypeEnum.Error, true);
                        return(RedirectToAction("/"));
                    }
                    if (DaoCounter.Exists("HALL_NO", info.HALL_NO))
                    {
                        Alter("不允许删除,该服务厅还存在窗口!", util.Enum.AlterTypeEnum.Error, true);
                        return(RedirectToAction("/"));
                    }
                    dao.Delete("HALL_NO", dId);
                }

                return(RedirectToAction("/"));
            }
            catch (Exception ex)
            {
                LogHelper.ErrorLog("系统错误", ex);
                return(Redirect("/Home/Error"));
            }
        }
示例#6
0
        public ActionResult ShowCNT(string ct, DateTime?btime, DateTime?etime, string staffid, string orgid)
        {
            var    dataDT  = new STAT_STAFF_BUSI_TOT_D_DAL().GetSTATList_FULLDT(staffid, ref btime, ref etime, orgid);
            string caption = "";

            if (ct == "CALLCNT")
            {
                caption = "排队业务报表--呼叫量";
            }
            if (ct == "HANDLECNT")
            {
                caption = "排队业务报表--办理量";
            }
            if (ct == "OVERTIMECNT")
            {
                caption = "排队业务报表--等候超时量";
            }
            if (ct == "SECONDCNT")
            {
                caption = "排队业务报表--二次办税量";
            }
            if (ct == "WAITPERCENT")
            {
                caption = "排队业务报表--平均等候时间";
            }
            if (ct == "LOCALCNT")
            {
                caption = "排队业务报表--同城受理量";
            }
            if (ct == "VOTECNT")
            {
                caption = "排队业务报表--一票多业务量";
            }
            if (ct == "ABANDONCNT")
            {
                caption = "排队业务报表--弃号量";
            }

            if (ct == "CALLCNT")
            {
                dataDT.Columns[1].SetOrdinal(1);
            }
            if (ct == "HANDLECNT")
            {
                dataDT.Columns[2].SetOrdinal(1);
            }
            if (ct == "OVERTIMECNT")
            {
                dataDT.Columns[11].SetOrdinal(1);
            }
            if (ct == "SECONDCNT")
            {
                dataDT.Columns[12].SetOrdinal(1);
            }
            if (ct == "WAITPERCENT")
            {
                dataDT.Columns[13].SetOrdinal(1);
            }
            if (ct == "LOCALCNT")
            {
                dataDT.Columns[4].SetOrdinal(1);
            }
            if (ct == "VOTECNT")
            {
                dataDT.Columns[5].SetOrdinal(1);
            }
            if (ct == "ABANDONCNT")
            {
                dataDT.Columns[3].SetOrdinal(1);
            }
            while (dataDT.Columns.Count > 2)
            {
                dataDT.Columns.RemoveAt(2);
            }
            var orgall = DalUser.GetUserORG(UserState.UserID);

            string MainTitle = "";

            if (!string.IsNullOrEmpty(orgid))
            {
                MainTitle += orgall.FirstOrDefault((o => o.ORG_ID == orgid)).ORG_NAM;
            }
            else
            {
                MainTitle += orgall.OrderBy(o => o.ORG_LEVEL).FirstOrDefault().ORG_NAM;
            }
            if (!string.IsNullOrEmpty(staffid))
            {
                var staff = DaoStaff.GetEntity("STAFF_ID", staffid);
                if (null != staff)
                {
                    MainTitle = staff.STAFF_NAM;
                }
            }
            MainTitle += "<span style='font-size:12px;'>(" + btime.Value.ToString("yyyy年MM月dd日");
            MainTitle += " - " + etime.Value.ToString("yyyy年MM月dd日") + ")</span>";

            ViewBag.MainTitle = MainTitle;
            MainTitle         = MainTitle.Replace("<span style='font-size:12px;'>", "")
                                .Replace("</span>", "");

            if (ct == "WAITPERCENT")
            {
                ViewBag.ChartXml       = CreateMSColumn3DChart(caption, dataDT, 580, MainTitle, true, true, "秒", "60", "分");
                ViewBag.ChartSplineXML = CreateMSSplineChart(caption, dataDT, 550, null, null, MainTitle, true, "秒", "60", "分");
            }
            else
            {
                ViewBag.ChartXml       = CreateMSColumn3DChart(caption, dataDT, 580, MainTitle, true);
                ViewBag.ChartSplineXML = CreateMSSplineChart(caption, dataDT, 550, null, null, MainTitle);
            }

            return(View());
        }