Beispiel #1
0
    protected void imgBtnSearch_Click(object sender, ImageClickEventArgs e)
    {
        TextBox            txtBeginTime           = this.ChoseTimeUC1.FindControl("txtBeginTime") as TextBox;
        TextBox            txtEndTime             = this.ChoseTimeUC1.FindControl("txtEndTime") as TextBox;
        DropDownList       ddlBranchs             = this.BranchDepartDdlUC1.FindControl("ddlBranchs") as DropDownList;
        DropDownList       ddlDeparts             = this.BranchDepartDdlUC1.FindControl("ddlDeparts") as DropDownList;
        string             ddlBranchSelectedValue = ddlBranchs.Enabled == false ? "" : ddlBranchs.SelectedValue;
        string             ddlDepartSelectedValue = ddlDeparts.Enabled == false ? "" : ddlDeparts.SelectedValue;
        IList <ManualSign> msList = ManualSignManager.SearchManualSignByCondition(
            txtBeginTime.Text.Trim(), txtEndTime.Text.Trim(), ddlBranchSelectedValue, ddlDepartSelectedValue, txtUserId.Text.Trim(), txtUserName.Text.Trim());

        if (msList != null)
        {
            if (msList.Count > 0)
            {
                ViewState["msList"] = msList;
                gvSearch.DataSource = msList;
                gvSearch.DataBind();
                Unite(gvSearch);
                divSearch.Visible = true;
            }
            else
            {
                divSearch.Visible = false;
            }
        }
    }
Beispiel #2
0
    private void BindGridView()
    {
        TextBox            txtBeginTime = this.ChoseTimeUC1.FindControl("txtBeginTime") as TextBox;
        TextBox            txtEndTime   = this.ChoseTimeUC1.FindControl("txtEndTime") as TextBox;
        DropDownList       ddlBranchs   = this.BranchDepartDdlUC1.FindControl("ddlBranchs") as DropDownList;
        DropDownList       ddlDeparts   = this.BranchDepartDdlUC1.FindControl("ddlDeparts") as DropDownList;
        IList <ManualSign> msList       = ManualSignManager.SearchManualSignByCondition(
            txtBeginTime.Text.Trim(), txtEndTime.Text.Trim(), ddlBranchs.SelectedValue,
            ddlDeparts.SelectedValue, null, null);

        if (msList != null)
        {
            if (msList.Count > 0)
            {
                IList <ManualSign> list = ManualSignManager.GetManualSignCountInfo(msList, txtBeginTime.Text.Trim(), txtEndTime.Text.Trim());
                gvSignInfoStatistic.DataSource = list;
                gvSignInfoStatistic.DataBind();
                Unite(gvSignInfoStatistic);
                info.Visible      = true;
                btnExport.Enabled = true;
                ViewState["list"] = list;
            }
            else
            {
                info.Visible      = false;
                btnExport.Enabled = false;
            }
        }
    }
Beispiel #3
0
    protected void InitInterface()
    {
        txtSignTime.Text = DateTime.Now.ToShortDateString();
        // txtSignDesc.Text = "";
        User u = Session["Login"] as User;

        //是否已经当天签退
        if (ManualSignManager.GetManualSignState(false, u.UserId) == 1)
        {
            btnSignIn.Enabled  = true;
            btnSignOut.Enabled = false;
        }//是否已签到
        else if (ManualSignManager.GetManualSignState(true, u.UserId) == 1)
        {
            btnSignIn.Enabled  = false;
            btnSignOut.Enabled = true;
        }
        else
        {
            btnSignIn.Enabled  = true;
            btnSignOut.Enabled = false;
        }

        if (Session["Login"] != null)
        {
            IList <ManualSign> msList =
                ManualSignManager.
                SearchManualSignByCondition
                    (string.Format("{0:yyyy-MM-dd 0:00:00}", DateTime.Now), string.Format("{0:yyyy-MM-dd 23:59:59}",
                                                                                          DateTime.Now), null, u.DepartId.ToString(), u.UserId, null);
            if (msList.Count > 0)
            {
                FillManual(0, msList[0]);
                divExit.Visible = true;
            }
        }
    }