Пример #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["PARecordID"].ToString(),
             "','",
             dataRowView["IsHaveDo"].ToString(),
             "');"
         });
         e.Row.Cells[0].Text = Convert.ToString(e.Row.RowIndex + 1);
         e.Row.Cells[2].Text = BooksCommonClass.GetUserName(dataRowView["ApplyMan"].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
 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 object[]
         {
             "OnRecord(this);ClickRow(",
             this.DepotID,
             ",'",
             dataRowView["CheckRecordID"].ToString(),
             "','",
             dataRowView["IsConfirm"].ToString(),
             "');"
         });
         e.Row.Cells[0].Text = Convert.ToString(e.Row.RowIndex + 1);
         e.Row.Cells[2].Text = BooksCommonClass.GetUserName(dataRowView["UserCode"].ToString());
         string a;
         if ((a = dataRowView["IsConfirm"].ToString()) != null)
         {
             if (a == "0")
             {
                 e.Row.Cells[3].Text = "未确认";
                 return;
             }
             if (!(a == "1"))
             {
                 return;
             }
             e.Row.Cells[3].Text = "已确认";
         }
     }
 }
Пример #4
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));
    }
Пример #5
0
    private void EditDisplay()
    {
        HROrgManpowerPlan model = this.hrAction.GetModel(this.RecordID);

        if (model != null)
        {
            this.LbLayoutName.Text = model.PlanName;
            this.LbLayoutDate.Text = model.RecordDate.ToShortDateString();
            this.LblAddPerson.Text = BooksCommonClass.GetUserName(model.UserCode);
        }
    }
Пример #6
0
    private void Bind()
    {
        this.TVBookClass.Nodes.Clear();
        this.TVBookClass.Target = this.TargetFrame;
        TreeNode treeNode = new TreeNode();

        treeNode.Text = this.TypeName;
        this.TVBookClass.Nodes.Add(treeNode);
        DataTable booksClass = BooksCommonClass.GetBooksClass(this.ClassTypeCode);

        this.CreateChildNodes(treeNode, booksClass, "ParentClassCode=''");
    }
Пример #7
0
 protected void btnBookSearch_Click(object sender, EventArgs e)
 {
     this.strWhere = "LibraryCode='" + this.LibraryCode + "'";
     if (this.DDLSearch.SelectedValue == "0")
     {
         this.strWhere = this.strWhere + " and FileName='" + this.txtotherSearch.Text + "' ";
     }
     if (this.DDLSearch.SelectedValue == "1")
     {
         this.strWhere = this.strWhere + " and BorrowMan='" + BooksCommonClass.GetUserCode(this.txtotherSearch.Text) + "' ";
     }
     this.Bind(this.strWhere);
 }
Пример #8
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();
        }
    }
Пример #9
0
    private void EditDisplay()
    {
        DataTable list = this.amAction.GetList("PARecordID=" + 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.HdnApplyPerson.Value = dataRow["ApplyMan"].ToString();
            this.txtUserPerson.Text   = BooksCommonClass.GetUserName(dataRow["UseMan"].ToString());
            this.HdnUserPerson.Value  = dataRow["UseMan"].ToString();
        }
    }
Пример #10
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"]     = "OnRecord(this);";
         e.Row.Cells[0].Text             = Convert.ToString(e.Row.RowIndex + 1);
         string a;
         if ((a = dataRowView["UseType"].ToString()) != null)
         {
             if (!(a == "0"))
             {
                 if (a == "1")
                 {
                     e.Row.Cells[2].Text = "以旧换新";
                 }
             }
             else
             {
                 e.Row.Cells[2].Text = "不回收";
             }
         }
         string a2;
         if ((a2 = dataRowView["GetType"].ToString()) != null)
         {
             if (!(a2 == "0"))
             {
                 if (a2 == "1")
                 {
                     e.Row.Cells[3].Text = "部门公共";
                 }
             }
             else
             {
                 e.Row.Cells[3].Text = "个人领用";
             }
         }
         TextBox textBox = (TextBox)e.Row.Cells[7].FindControl("txtFactAmount");
         textBox.Attributes["onblur"] = "javascript:checkDecimal(this);";
         DataTable stockCheckDetailTable = this.amAction.GetStockCheckDetailTable(this.InStorageID.ToString(), dataRowView["MaterialID"].ToString());
         if (stockCheckDetailTable.Rows.Count > 0)
         {
             DataRow dataRow = stockCheckDetailTable.Rows[0];
             textBox.Text        = dataRow["CheckNumber"].ToString();
             e.Row.Cells[8].Text = BooksCommonClass.GetUserName(dataRow["UserCode"].ToString());
             e.Row.Cells[9].Text = dataRow["Remark"].ToString();
         }
     }
 }
Пример #11
0
    private SMSLog GetSMSData()
    {
        string userName = BooksCommonClass.GetUserName(this.Session["yhdm"].ToString());

        return(new SMSLog
        {
            ID = 0,
            I_XGID = this.HdnRecordID.Value,
            Message = userName + "向您发送档案借阅催还信息!",
            ReceiveUser = this.HdnBorrowMan.Value,
            SendTime = DateTime.Now,
            SendUser = this.HdnBorrowMan.Value,
            V_LXBM = "007"
        });
    }
Пример #12
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());
        }
    }
Пример #13
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["RecordID"].ToString(),
                "','",
                dataRowView["AuditState"].ToString(),
                "','",
                dataRowView["IsConfirm"].ToString(),
                "');"
            });
            e.Row.Cells[0].Text = Convert.ToString(e.Row.RowIndex + 1);
            e.Row.Cells[1].Text = BooksCommonClass.GetUserName(dataRowView["UserCode"].ToString());
            if (dataRowView["IsConfirm"].ToString() == "1")
            {
                e.Row.Cells[3].Text = "报损确认";
                return;
            }
            switch (int.Parse(dataRowView["AuditState"].ToString()))
            {
            case -2:
                e.Row.Cells[3].Text = "打回到发起人";
                break;

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

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

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

            default:
                return;
            }
        }
    }
Пример #14
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["LibraryCode"].ToString(),
             "','",
             dataRowView["Manager"].ToString(),
             "');"
         });
         e.Row.Cells[0].Text = Convert.ToString(e.Row.RowIndex + 1);
         e.Row.Cells[2].Text = BooksCommonClass.GetUserName(dataRowView["Manager"].ToString());
     }
 }
Пример #15
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());
     }
 }
Пример #16
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());
     }
 }
Пример #17
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;
            }
        }
    }
Пример #18
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["RecordID"].ToString(),
                "','",
                dataRowView["LendState"].ToString(),
                "','",
                dataRowView["BorrowMan"].ToString(),
                "');"
            });
            e.Row.Cells[0].Text = BooksCommonClass.GetUserName(this.Session["yhdm"].ToString());
            switch (int.Parse(dataRowView["LendState"].ToString()))
            {
            case 1:
                e.Row.Cells[5].Text = "未借出";
                return;

            case 2:
                e.Row.Cells[5].Text = "已借出";
                return;

            case 3:
                e.Row.Cells[5].Text = "归还申请";
                return;

            case 4:
                e.Row.Cells[5].Text = "已归还";
                break;

            default:
                return;
            }
        }
    }
Пример #19
0
 private void AddDisplay()
 {
     this.lblAddPerson.Text  = BooksCommonClass.GetUserName(this.Session["yhdm"].ToString());
     this.txtLayoutDate.Text = DateTime.Now.ToShortDateString();
 }
Пример #20
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["DARecordID"].ToString(),
                "','",
                dataRowView["AuditState"].ToString(),
                "','",
                dataRowView["IsSubmit"].ToString(),
                "','",
                dataRowView["IsAbove"].ToString(),
                "','",
                dataRowView["ApplyDepartment"].ToString(),
                "');"
            });
            e.Row.Cells[0].Text = Convert.ToString(e.Row.RowIndex + 1);
            e.Row.Cells[2].Text = BooksCommonClass.GetUserName(dataRowView["ApplyMan"].ToString());
            string a;
            if (dataRowView["IsAbove"].ToString() == "0" && (a = dataRowView["IsSubmit"].ToString()) != null)
            {
                if (!(a == "0"))
                {
                    if (a == "1")
                    {
                        e.Row.Cells[3].Text = "已提交";
                    }
                }
                else
                {
                    e.Row.Cells[3].Text = "未提交";
                }
            }
            if (dataRowView["IsAbove"].ToString() == "1")
            {
                switch (int.Parse(dataRowView["AuditState"].ToString()))
                {
                case -2:
                    e.Row.Cells[3].Text = "打回到发起人";
                    break;

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

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

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

                default:
                    return;
                }
            }
        }
    }