Beispiel #1
0
        private void DataBind(string key = "")
        {
            DataTable dt = new DataTable();

            dt             = progBll.SelByAppID(appID.ToString());
            EGV.DataSource = dt;
            EGV.DataBind();
        }
        private void DataBind(string key = "")
        {
            DataTable dt = new DataTable();

            if (buser.GetLogin().UserID != oaMod.UserID)
            {
                dt = progBll.SelByAppID(appID.ToString(), buser.GetLogin().UserID.ToString());
            }
            else
            {
                dt = progBll.SelByAppID(appID.ToString());
            }
            EGV.DataSource = dt;
            EGV.DataBind();
        }
Beispiel #3
0
        public void AppProgBind()
        {
            DataTable dt = new DataTable();

            dt             = progBll.SelByAppID(appID.ToString());
            EGV.DataSource = dt;
            EGV.DataBind();
        }
Beispiel #4
0
    /// <summary>
    /// 返回占位符字符串
    /// </summary>
    /// <param name="oaMod">OA模型</param>
    /// <param name="holdIndex">占位符</param>
    /// <param name="filter">是否要进行进滤,输入RowFilter语句,用于事务</param>
    public string GetHolder(M_OA_Document oaMod, int holdIndex, string filter = "")
    {
        string r = "";

        switch (Holder[holdIndex])
        {
        case "{$SignInfo}":
            //获取所有用户签字信息
            DataTable progDT = progBll.SelByAppID(oaMod.ID.ToString());
            if (!string.IsNullOrEmpty(filter))
            {
                progDT.DefaultView.RowFilter = filter;
                progDT = progDT.DefaultView.ToTable();
            }
            if (progDT == null || progDT.Rows.Count < 1)
            {
            }
            else
            {
                //需要判断是协办还是主办人
                foreach (DataRow dr in progDT.Rows)
                {
                    int           docid   = Convert.ToInt32(dr["AppID"]);
                    int           stepnum = Convert.ToInt32(dr["ProLevel"]);
                    M_MisProLevel freeMod = oaMod.IsFreePro ? freeBll.SelByProIDAndStepNum(docid, stepnum) : stepBll.SelByProIDAndStepNum(oaMod.ProID, stepnum);
                    if (freeMod == null)
                    {
                        continue;
                    }
                    if (freeMod.CCUser.Contains("," + DataConvert.CStr(dr["AppRoveID"]) + ","))    //协办
                    {
                        string template = HttpUtility.HtmlDecode(OAConfig.ParterSignTemplate);
                        r += template.Replace("@UserName", dr["UserName"].ToString()).Replace("@Remind", dr["Remind"].ToString()).Replace("@SignDate", Convert.ToDateTime(dr["CreateTime"]).ToString("yyyy年MM月dd日"));
                    }
                    else    //主办
                    {
                        string template = HttpUtility.HtmlDecode(OAConfig.LeaderSignTemplate);
                        r += template.Replace("@UserName", dr["UserName"].ToString()).Replace("@Remind", dr["Remind"].ToString()).Replace("@SignDate", Convert.ToDateTime(dr["CreateTime"]).ToString("yyyy年MM月dd日"));
                    }
                }
            }
            break;

        default:
            break;
        }
        return(r);
    }
Beispiel #5
0
        public void InsertRecord()
        {
            int           status = DataConverter.CLng(Request["status"]);
            int           id     = DataConverter.CLng(Request["ID"]);
            M_MisApproval maMod  = maBll.SelReturnModel(id);

            #region M_MisProLevel
            M_MisProLevel CurrentLevel = new M_MisProLevel();
            DataTable     appProgDT    = mappBll.SelByAppID(id.ToString());                        //已进行到的流程
            DataTable     proLevelDT   = proBll.SelByProID(maMod.ProcedureID);                     //全部流程
            if (appProgDT.Rows.Count < 1)                                                          //尚未开始
            {
                CurrentLevel = CurrentLevel.GetModelFromDR(proLevelDT.Rows[0]);                    //用第一个填充,其值是经过Level排序的
            }
            else if (appProgDT.Rows.Count < proLevelDT.Rows.Count)                                 //已经开始但未完成
            {
                string proLevel = appProgDT.Rows[appProgDT.Rows.Count - 1]["ProLevel"].ToString(); //现在进行到的最后
                CurrentLevel = proBll.SelByProIDAndStepNum(maMod.ProcedureID, DataConverter.CLng(proLevel));
            }
            else //已完成,或无流程的
            {
                CurrentLevel.Status = 99;
            }
            #endregion
            M_Mis_AppProg model = new M_Mis_AppProg();
            model.AppID        = maMod.ID;
            model.ProID        = maMod.ProcedureID;
            model.ProLevel     = CurrentLevel.stepNum;
            model.ProLevelName = CurrentLevel.stepName;
            model.ApproveID    = mu.UserID;
            model.Result       = status;
            model.CreateTime   = DateTime.Now;
            mappBll.Insert(model);
            if (status == -1)
            {
                maMod.Results = -1;
            }
            maBll.UpdateByID(maMod);
            Response.Redirect("ApproverView"); return;
        }