Exemplo n.º 1
0
    private void getDataBind()
    {
        StringBuilder sbContent = new StringBuilder();
        UserInfoBLL   uBll      = new UserInfoBLL();

        HYTD.BLL.Call_WorkBillHistoryBLL   bll  = new HYTD.BLL.Call_WorkBillHistoryBLL();
        List <Models.Call_WorkBillHistory> list = new List <Models.Call_WorkBillHistory>();

        list = bll.GetCall_WorkBillHistoryList().Where(c => c.CWBH_CWB_ID == WID).ToList();
        foreach (var m in list)
        {
            sbContent.AppendFormat("<tbody>");
            sbContent.AppendFormat("<tr>");
            sbContent.AppendFormat("<td class=\"by\" title=\"{0}\">{0}&nbsp;</td>", m.CWBH_Description);
            sbContent.AppendFormat("<td class=\"by\" title=\"{0}\">{0}&nbsp;</td>", m.CWBH_Solution);
            sbContent.AppendFormat("<td class=\"by\" title=\"{0}\">{0}&nbsp;</td>", m.CWBH_Remark);
            sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", PublicEnum.GetEnumDescription <PublicEnum.CallWorkBillStatus>(m.CWBH_Status.ToString()));
            sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", m.CWBH_OperationTime);
            sbContent.AppendFormat("<td class=\"num\">{0}&nbsp;</td>", uBll.GetUserInfoEntityByUserCode(m.CWBH_UserID.Value));
            int intUserID = 0;
            if (m.CWBH_OperationUser != null)
            {
                intUserID = m.CWBH_OperationUser.Value;
            }
            sbContent.AppendFormat("<td class=\"num\">{0}&nbsp;</td>", uBll.GetUserInfoEntityByUserCode(intUserID));
            sbContent.AppendFormat("</tr>");
            sbContent.AppendFormat("</tbody>");
        }

        script = sbContent.ToString();
    }
Exemplo n.º 2
0
 /// <summary>
 /// 绑定假期类型
 /// </summary>
 private void BindHolidaysType()
 {
     HolidaysType.Items.Add("请选择");
     HolidaysType.Items.Add(PublicEnum.GetEnumDescription <PublicEnum.HolidaysType>(PublicEnum.HolidaysType.yearDay.ToString()));
     HolidaysType.Items.Add(PublicEnum.GetEnumDescription <PublicEnum.HolidaysType>(PublicEnum.HolidaysType.Swopped.ToString()));
     HolidaysType.Items.Add(PublicEnum.GetEnumDescription <PublicEnum.HolidaysType>(PublicEnum.HolidaysType.workDay.ToString()));
 }
Exemplo n.º 3
0
    /// <summary>
    /// 获取类别
    /// </summary>
    /// <returns></returns>
    public string GetCategory(int CID)
    {
        //StringBuilder sb = new StringBuilder();

        //sb.Append("<option value='-1'>全部</option>");
        //sb.AppendFormat("<option value='{0}' selected='selected'>{1}</option>", 1, "大学");
        //sb.AppendFormat("<option value='{0}'>{1}</option>", 2, "政府");
        string str = PublicEnum.EnumBindList_Client <PublicEnum.CallCunstomerType>(true, false, 1);

        return(str);
    }
Exemplo n.º 4
0
    /// <summary>
    /// 用户列表
    /// </summary>
    private void ShowUserAll()
    {
        int         numPerPage = 10;//每页显示数量
        string      orderBy    = " UserID desc ";
        int         totalCount = 0;
        UserInfoBLL bll        = new UserInfoBLL();
        UserInfoTO  sto        = new UserInfoTO();

        sto.UserCode = txtUsere.Text.Trim();
        sto.UserName = txtTrueName.Text.Trim();
        if (ddlDep.SelectedValue != "")
        {
            sto.DepartmentId = Convert.ToInt32(ddlDep.SelectedValue);
        }
        DataTable     dt = bll.GetUserInfoList(sto, AspNetPager1.CurrentPageIndex, numPerPage, orderBy, out totalCount, "");
        StringBuilder sb = new StringBuilder();

        if (dt != null && dt.Rows.Count > 0)
        {
            AspNetPager1.RecordCount = totalCount;
            AspNetPager1.PageSize    = numPerPage;
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DataRow dr = dt.Rows[i];
                sb.AppendFormat("<tr><td align='center'>{0}</td>", i + 1 * (numPerPage * (AspNetPager1.CurrentPageIndex - 1) + 1));
                sb.AppendFormat("<td align='center'>{0}</td>", dr["UserCode"]);
                sb.AppendFormat("<td align='center'style='width:75px;'>{0}</td>", dr["UserName"]);
                sb.AppendFormat("<td align='center'style='width:75px;'>{0}</td>", dr["Name"]);
                sb.AppendFormat("<td align='center'style='width:75px;'>{0}</td>", dr["RoleName"]);
                sb.AppendFormat("<td align='center' style='width:70px;'>{0}</td>", PublicEnum.GetEnumDescription <PublicEnum.PublicIsVindicate>(dr["IsAdmin"].ToString()));
                if (Convert.ToInt32(dr["UserStatus"]) == 1)
                {
                    sb.AppendFormat("<td align='center'style='width:70px;'>{0}</td>", PublicEnum.GetEnumDescription <PublicEnum.PublicStatus>(dr["UserStatus"].ToString()));
                }
                else
                {
                    sb.AppendFormat("<td align='center'style='width:70px;color:Red;'>{0}</td>", PublicEnum.GetEnumDescription <PublicEnum.PublicStatus>(dr["UserStatus"].ToString()));
                }
                if (dr["EntyTime"] is DBNull)
                {
                    sb.AppendFormat("<td align='center'>{0}</td>", "");
                }
                else
                {
                    sb.AppendFormat("<td align='center'>{0}</td>", Convert.ToDateTime(dr["EntyTime"]).ToString("yyyy-MM-dd"));
                }
                sb.AppendFormat("<td align='center'>{0}</td>", dr["Tel"]);
                sb.AppendFormat("<td align='center' style='width:160px;'>{0}</td>", dr["Email"]);
                sb.AppendFormat("<td align='center'><a href='UpdateUser.aspx?userID={0}'>修 改</a> &nbsp&nbsp&nbsp  <a     href='javascript:;' onclick='delUser({0})' >禁 用</a></td>", dr["UserID"]);
                sb.Append("</tr>");
            }
        }
        UserList = sb.ToString();
    }
Exemplo n.º 5
0
    /// <summary>
    /// 绑定数据源
    /// </summary>
    private void BindHolidaysList()
    {
        HolidaysBLL BLL        = new HolidaysBLL();
        HolidaysTO  to         = new HolidaysTO();
        int         numPerPage = 10;//每页显示数量
        string      orderBy    = " ID desc ";
        int         rowCount   = 0;

        #region  择条件
        if (!string.IsNullOrEmpty(txtUserName.Text))
        {
            to.UserName = txtUserName.Text;
        }
        if (!string.IsNullOrEmpty(HolidaysType.SelectedValue) && HolidaysType.SelectedValue != "请选择")
        {
            to.HolidaysType = PublicEnum.GetEnumDescriptionvalue <PublicEnum.HolidaysType>(HolidaysType.SelectedValue);
        }
        if (!string.IsNullOrEmpty(txtStartDate.Text))
        {
            to.StratTime = txtStartDate.Text;
        }
        if (!string.IsNullOrEmpty(txtEndDate.Text))
        {
            to.EndTime = txtEndDate.Text;
        }
        #endregion
        DataTable dt = BLL.GetHolidaysTableList(to, AspNetPager1.CurrentPageIndex, numPerPage, orderBy, out rowCount);
        if (dt != null && dt.Rows.Count > 0)
        {
            RepeaterHoliday.DataSource = dt;
        }
        else
        {
            RepeaterHoliday.DataSource = new DataTable();
        }
        AspNetPager1.RecordCount = rowCount;
        AspNetPager1.PageSize    = numPerPage;
        RepeaterHoliday.DataBind();
    }
Exemplo n.º 6
0
 public PublicEnum Enum(PublicEnum parameter = PublicEnum.Case1) => parameter;
Exemplo n.º 7
0
 public PublicEnum EnumMethodReturningEnum(PublicEnum myenum) => myenum == PublicEnum.Case1 ? PublicEnum.Case2 : PublicEnum.Case1;
Exemplo n.º 8
0
 public EnumAttr(PublicEnum e)
 {
     value = e;
 }
Exemplo n.º 9
0
    /// <summary>
    /// 日志列表
    /// </summary>
    private void LogList()
    {
        RePostsBLL    bll = new RePostsBLL();
        StringBuilder sb  = new StringBuilder();
        RePostsTO     sto = new RePostsTO();

        if (!string.IsNullOrEmpty(Request["select"]))
        {
            sto.CID = type = Convert.ToInt32(Request["select"].Trim());
        }
        if (!string.IsNullOrEmpty(Request["title"]))
        {
            sto.Title = txt = Request["title"].Trim();
        }
        if (!string.IsNullOrEmpty(Request["remark"]))
        {
            sto.Content = remark = Request["remark"].Trim();
        }
        if (!string.IsNullOrEmpty(Request["ip"]))
        {
            sto.UserIP = ip = Request["ip"].Trim();
        }
        if (!string.IsNullOrEmpty(Request["time"]))
        {
            sto.Time = time = Request["time"].Trim();
        }
        if (!string.IsNullOrEmpty(Request["endtime"]))
        {
            sto.EndTime = endtime = Request["endtime"].Trim();
        }
        if (!string.IsNullOrEmpty(Request["sendUser"]))
        {
            sto.SendUser = sendUser = Request["sendUser"].Trim();
        }
        if (!string.IsNullOrEmpty(Request["backUser"]))
        {
            sto.ReUser = backUser = Request["backUser"].Trim();
        }
        if (!string.IsNullOrEmpty(Request["niming"]))
        {
            sto.isAnonymity = niming = Convert.ToInt32(Request["niming"].Trim());
        }
        else
        {
            sto.isAnonymity = 400;
        }

        if (!string.IsNullOrEmpty(Request["fankui"]))
        {
            sto.isFeedback = fankui = Convert.ToInt32(Request["fankui"].Trim());
        }
        else
        {
            sto.isFeedback = 400;
        }
        if (!string.IsNullOrEmpty(Request.QueryString["pageIndex"]))
        {
            pageIndex = int.Parse(Request.QueryString["pageIndex"]);
        }
        DataTable dt = bll.GetNewTab(sto, pageIndex, pageSize, "", out rowCount);
        //分页
        string url = "Searchlog.aspx?pageIndex={0}&typecid=1110&select=" + type + "&title=" + txt + "&remark=" + remark + "&ip=" + ip + "&time=" + time + "&sendUser="******"&backUser="******"&niming=" + niming + "&fankui=" + fankui;

        strtt = DividePage.Pager(pageSize, rowCount, pageIndex, url);
        if (dt.Rows.Count > 0)
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DataRow dr         = dt.Rows[i];
                string  status     = dr["status"].ToString();
                string  strContent = StringHelper.FilterHTML(dr["remark"].ToString().Trim()).Trim();
                if (strContent.Length == 0)
                {
                    strContent = "&nbsp";
                }

                string topic_ftcolor = "";
                if (Convert.ToInt32(dr["Ispos"]) == 1)
                {
                    topic_ftcolor = " style=\"font-weight:bold\"";
                }

                sb.AppendFormat("<tbody><tr><td class=\"by\" title=\"{0}\"  " + topic_ftcolor + ">[{1}]<a href=\"detail.aspx?pageIndex=1&fatherID={2}&num=0\" target=\"_back\">{3}</a></td>", dr["Title"], dr["Name"], dr["ID"],
                                HYTD.Common.StringHelper.SubString(dr["Title"].ToString(), 25));
                sb.AppendFormat("<td class=\"by\" title=\"{0}\">{1}&nbsp;</td>", strContent,
                                HYTD.Common.StringHelper.SubString(strContent, 25));
                //ispos  1表示发贴   0为回复内容
                if (Convert.ToInt32(dr["Ispos"]) == 1)
                {
                    sb.AppendFormat("<td class=\"num\">{0}&nbsp;<br />[{1}]</td>",
                                    dr["SendUserName"], PublicEnum.GetEnumDescription <PublicEnum.PubliucIsVidicate>(dr["isAnonymity"].ToString()));
                    sb.AppendFormat("<td class=\"num\">{0}&nbsp;</td>", "");
                }
                else
                {
                    sb.AppendFormat("<td class=\"num\">{0}&nbsp;<br />[{1}]</td>", dr["SendUserName"], PublicEnum.GetEnumDescription <PublicEnum.PubliucIsVidicate>(dr["isAnonymity"].ToString()));
                    sb.AppendFormat("<td class=\"num\">{0}&nbsp;<br />[{1}]</td>", dr["ReUserName"], PublicEnum.GetEnumDescription <PublicEnum.PubliucIsVidicate>(dr["isAnonymity"].ToString()));
                }
                sb.AppendFormat("<td class=\"num\">{0}&nbsp;</td>", PublicEnum.GetEnumDescription <PublicEnum.PubliucIsVidicate>(dr["isFeedback"].ToString()));
                sb.AppendFormat("<td class=\"num\">{0}&nbsp;</td>", dr["retime"]);
                sb.AppendFormat("<td class=\"num\">{0}&nbsp;</td>", dr["UserIP"]);
                if (status == "1")
                {
                    sb.AppendFormat("<td class=\"num\" style=\"width:40px\"><a href=\"javascript:;\"  onclick=\"javascript:DeleteReplyforLog({0},{1})\">删除</a></td></tr></tbody>", dr["IDNew"], dr["tp"]);
                }
                else
                {
                    sb.AppendFormat("<td class=\"num\" style=\"width:40px\"><a href=\"javascript:;\"  onclick=\"javascript:RecoverReplyforLog({0},{1})\" style=\"color:red;\">恢复显示</a></td></tr></tbody>", dr["IDNew"], dr["tp"]);
                }
            }
            script = sb.ToString();
        }
        else
        {
            script = "没有搜索到相关内容!";
        }
        //获取当前页
        if (rowCount % pageSize == 0)
        {
            pageNum = rowCount / pageSize;
        }
        else
        {
            pageNum = (rowCount / pageSize) + 1;
        }
    }
Exemplo n.º 10
0
 public void MethodTakingEnum(PublicEnum publicEnum)
 {
 }