예제 #1
0
 protected void GVManager_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowIndex > -1)
     {
         DataRowView dataRowView = (DataRowView)e.Row.DataItem;
         e.Row.Attributes["onmouseover"] = "OnMouseOverRecord(this);";
         e.Row.Attributes["onclick"]     = string.Concat(new string[]
         {
             "OnRecord(this);ClickRow('",
             dataRowView["DARecordID"].ToString(),
             "','",
             dataRowView["IsHaveDo"].ToString(),
             "');"
         });
         e.Row.Cells[0].Text = Convert.ToString(e.Row.RowIndex + 1);
         e.Row.Cells[2].Text = BooksCommonClass.GetDepartmentName(int.Parse(dataRowView["ApplyDepartment"].ToString()));
         string a;
         if ((a = dataRowView["IsHaveDo"].ToString()) != null)
         {
             if (a == "" || a == "0")
             {
                 e.Row.Cells[3].Text = "未办理";
                 return;
             }
             if (!(a == "1"))
             {
                 return;
             }
             e.Row.Cells[3].Text = "已办理";
         }
     }
 }
예제 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (base.Request["rid"] == null || base.Request["t"] == null || base.Request["dc"] == null)
     {
         this.Page.RegisterStartupScript("", "<script>alert('参数错误!');returnValue=false;window.close();</script>");
         return;
     }
     if (!this.Page.IsPostBack)
     {
         base.Response.Cache.SetNoStore();
         this.OperateType = base.Request["t"].ToString().Trim();
         if (base.Request["rid"].ToString() != "")
         {
             this.RecordID = new Guid(base.Request["rid"].ToString());
         }
         else
         {
             this.RecordID = Guid.NewGuid();
         }
         this.DepartmentCode = base.Request["dc"].ToString();
         this.DepartmentName = BooksCommonClass.GetDepartmentName(this.DepartmentCode);
         if (this.OperateType == "add")
         {
             this.AddDisplay();
         }
         if (this.OperateType == "upd")
         {
             this.EditDisplay();
         }
     }
 }
예제 #3
0
    private void AddDisplay()
    {
        this.txtApplyDate.Text   = DateTime.Now.ToShortDateString();
        this.txtApplyPerson.Text = BooksCommonClass.GetUserName(base.UserCode);
        string personInfo = OAOfficeCommonClas.GetPersonInfo(base.UserCode, "i_bmdm");

        this.txtApplyDept.Text = BooksCommonClass.GetDepartmentName(int.Parse(personInfo));
    }
예제 #4
0
    private void EditDisplay()
    {
        DataTable list = this.amAction.GetList("DARecordID='" + this.InStorageID + "'");

        if (list.Rows.Count > 0)
        {
            DataRow dataRow = list.Rows[0];
            this.txtApplyDate.Text   = ((dataRow["ApplyDate"].ToString().Trim() == "") ? DateTime.Now.ToShortDateString() : Convert.ToDateTime(dataRow["ApplyDate"].ToString().Trim()).ToShortDateString());
            this.txtApplyPerson.Text = BooksCommonClass.GetUserName(dataRow["ApplyMan"].ToString());
            this.txtApplyDept.Text   = BooksCommonClass.GetDepartmentName(int.Parse(dataRow["ApplyDepartment"].ToString()));
            this.txtRemark.Text      = dataRow["Remark"].ToString();
        }
    }
예제 #5
0
    private void EditDisplay()
    {
        DataTable list = this.hrAction.GetList("RecordID='" + this.RecordID.ToString() + "'");

        if (list.Rows.Count > 0)
        {
            userManageDb userManageDb = new userManageDb();
            this.LbUserName.Text      = userManageDb.GetUserName(list.Rows[0]["UserCode"].ToString());
            this.LbAdjustContent.Text = list.Rows[0]["AdjustContent"].ToString();
            this.LbAdjustReason.Text  = list.Rows[0]["AdjustReason"].ToString();
            this.LbRecordDate.Text    = Convert.ToDateTime(list.Rows[0]["RecordDate"].ToString()).ToShortDateString();
            this.LbRemark.Text        = list.Rows[0]["Remark"].ToString();
            this.LbCorpCode.Text      = BooksCommonClass.GetDepartmentName(list.Rows[0]["CorpCode"].ToString());
        }
    }
예제 #6
0
 protected void GVBook_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowIndex > -1)
     {
         DataRowView dataRowView = (DataRowView)e.Row.DataItem;
         e.Row.Attributes["onmouseover"] = "OnMouseOverRecord(this);";
         e.Row.Attributes["onclick"]     = string.Concat(new string[]
         {
             "OnRecord(this);ClickRow('",
             dataRowView["v_yhdm"].ToString(),
             "','",
             dataRowView["PositionLevel"].ToString(),
             "');"
         });
         e.Row.Cells[0].Text = Convert.ToString(e.Row.RowIndex + 1);
         e.Row.Cells[1].Text = BooksCommonClass.GetDepartmentName(int.Parse(dataRowView["i_bmdm"].ToString()));
         e.Row.Cells[3].Text = OAOfficeCommonClas.GetChinaNum(dataRowView["PositionLevel"].ToString());
         e.Row.Cells[4].Text = OAOfficeCommonClas.GetPostAndRank(dataRowView["PostAndRank"].ToString());
     }
 }
예제 #7
0
 protected void GVBook_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowIndex > -1)
     {
         DataRowView dataRowView = (DataRowView)e.Row.DataItem;
         e.Row.Attributes["onmouseover"] = "OnMouseOverRecord(this);";
         e.Row.Attributes["onclick"]     = string.Concat(new string[]
         {
             "OnRecord(this);ClickRow('",
             base.Request["ic"].ToString(),
             "','",
             dataRowView["DARecordID"].ToString(),
             "','",
             dataRowView["ApplyDepartment"].ToString(),
             "');"
         });
         e.Row.Cells[0].Text = Convert.ToString(e.Row.RowIndex + 1);
         e.Row.Cells[2].Text = BooksCommonClass.GetDepartmentName(int.Parse(dataRowView["ApplyDepartment"].ToString()));
         e.Row.Cells[3].Text = BooksCommonClass.GetUserName(dataRowView["ApplyMan"].ToString());
     }
 }
예제 #8
0
    protected void GVBook_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowIndex > -1)
        {
            DataRowView dataRowView = (DataRowView)e.Row.DataItem;
            e.Row.Attributes["onmouseover"] = "OnMouseOverRecord(this);";
            e.Row.Attributes["onclick"]     = string.Concat(new string[]
            {
                "OnRecord(this);ClickRow('",
                dataRowView["ACRecordID"].ToString(),
                "','",
                dataRowView["AuditState"].ToString(),
                "');"
            });
            e.Row.Cells[0].Text = dataRowView["iYear"].ToString() + "年";
            e.Row.Cells[1].Text = dataRowView["iMonth"].ToString() + "月";
            e.Row.Cells[2].Text = BooksCommonClass.GetDepartmentName(dataRowView["CorpCode"].ToString());
            switch (int.Parse(dataRowView["AuditState"].ToString()))
            {
            case -2:
                e.Row.Cells[4].Text = "打回到发起人";
                break;

            case -1:
                e.Row.Cells[4].Text = "未启动流程";
                return;

            case 0:
                e.Row.Cells[4].Text = "流程流转中";
                return;

            case 1:
                e.Row.Cells[4].Text = "审核通过";
                return;

            default:
                return;
            }
        }
    }