protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         try
         {
             string logonName = SharedRules.LogonName();
             vs_CurrentUserLoginName = logonName;
             vs_CurrentUserID        = SharedRules.FindUserID(logonName, this.Page);
             if (string.IsNullOrEmpty(vs_CurrentUserID))
             {
                 vs_CurrentUserID = Request.QueryString["USERID"] != null
                     ? Request.QueryString["USERID"].ToString()
                     : "5050108";
             }
             InitialData();
             Extension.GetDepartmentData(Page);
             Extension.GetEmployeeData(Page);
             Extension.GetPositionData(Page);
         }
         catch (Exception ex)
         {
         }
     }
 }
Beispiel #2
0
        private void setK2WorkCount()
        {
            string _ConnectionString = "";
            string logonName         = SharedRules.LogonName();

            string currentUserID = SharedRules.FindUserID(logonName, this.Page);

            if (string.IsNullOrEmpty(currentUserID))
            {
                currentUserID = Request.QueryString["USERID"] != null
                    ? Request.QueryString["USERID"].ToString()
                    : "5050108";
            }

            DataTable dtDb = Extension.GetDataTable("SiteSetting");
            {
                if (!dtDb.DataTableIsNullOrEmpty())
                {
                    _ConnectionString = dtDb.Rows[0]["Value"].ToString();
                }
            }
            DataClassesDataAccessDataContext db = new DataClassesDataAccessDataContext(_ConnectionString);
            List <TRNDocument> listDocument     = db.TRNDocuments.Where(x => x.WaitingFor.Contains(currentUserID)).ToList();
            string             counter          = (listDocument.Count() > 999 ? 999 : listDocument.Count()).ToString();

            lbl_WorklistCounter.Text = counter;
        }