Exemple #1
0
        /// <summary>
        /// 根据ID,获取整个评分表的JSON格式数据
        /// </summary>
        /// <param name="rtid"></param>
        /// <returns></returns>
        private string GetJsonStrByRtid(int rtid)
        {
            int totalCount = 0;

            Entities.QS_RulesTable QsObject = BLL.QS_RulesTable.Instance.GetQS_RulesTable(rtid);

            Entities.QueryQS_Category queryC = new Entities.QueryQS_Category();
            queryC.QS_RTID = rtid;
            DataTable DtCategory = BLL.QS_Category.Instance.GetQS_Category(queryC, "", 1, 999999, out totalCount);

            Entities.QueryQS_Item queryI = new Entities.QueryQS_Item();
            queryI.QS_RTID = rtid;
            DataTable DtItem = BLL.QS_Item.Instance.GetQS_Item(queryI, "", 1, 999999, out totalCount);

            Entities.QueryQS_Standard queryS = new Entities.QueryQS_Standard();
            queryS.QS_RTID = rtid;
            DataTable DtStandard = BLL.QS_Standard.Instance.GetQS_Standard(queryS, "", 1, 999999, out totalCount);

            Entities.QueryQS_Marking queryM = new Entities.QueryQS_Marking();
            queryM.QS_RTID = rtid;
            DataTable DtMarking = BLL.QS_Marking.Instance.GetQS_Marking(queryM, "", 1, 999999, out totalCount);

            Entities.QueryQS_DeadOrAppraisal queryD = new Entities.QueryQS_DeadOrAppraisal();
            queryD.QS_RTID = rtid;
            DataTable DtDead = BLL.QS_DeadOrAppraisal.Instance.GetQS_DeadOrAppraisal(queryD, "", 1, 999999, out totalCount);

            string jsonStr = GetJsonStrByDataTable(QsObject, DtCategory, DtItem, DtStandard, DtMarking, DtDead);

            return(jsonStr);
        }
Exemple #2
0
        /// <summary>
        ///  更新一条数据
        /// </summary>
        public int Update(SqlTransaction sqltran, Entities.QS_RulesTable model)
        {
            SqlParameter[] parameters =
            {
                new SqlParameter("@QS_RTID",          SqlDbType.Int,         4),
                new SqlParameter("@Name",             SqlDbType.NVarChar,  100),
                new SqlParameter("@ScoreType",        SqlDbType.Int,         4),
                new SqlParameter("@Description",      SqlDbType.VarChar,   500),
                new SqlParameter("@Status",           SqlDbType.Int,         4),
                new SqlParameter("@DeadItemNum",      SqlDbType.Int,         4),
                new SqlParameter("@NoDeadItemNum",    SqlDbType.Int,         4),
                new SqlParameter("@LastModifyTime",   SqlDbType.DateTime),
                new SqlParameter("@LastModifyUserID", SqlDbType.VarChar,    50),
                new SqlParameter("@HaveQAppraisal",   SqlDbType.Int,         4),
                new SqlParameter("@RegionID",         SqlDbType.VarChar, 10)
            };
            parameters[0].Value  = model.QS_RTID;
            parameters[1].Value  = model.Name;
            parameters[2].Value  = model.ScoreType;
            parameters[3].Value  = model.Description;
            parameters[4].Value  = model.Status;
            parameters[5].Value  = model.DeadItemNum;
            parameters[6].Value  = model.NoDeadItemNum;
            parameters[7].Value  = model.LastModifyTime;
            parameters[8].Value  = model.LastModifyUserID;
            parameters[9].Value  = model.HaveQAppraisal;
            parameters[10].Value = model.RegionID;

            return(SqlHelper.ExecuteNonQuery(sqltran, CommandType.StoredProcedure, P_QS_RULESTABLE_UPDATE, parameters));
        }
Exemple #3
0
        /// <summary>
        ///  增加一条数据
        /// </summary>
        public int Insert(Entities.QS_RulesTable model)
        {
            SqlParameter[] parameters =
            {
                new SqlParameter("@QS_RTID",          SqlDbType.Int,         4),
                new SqlParameter("@Name",             SqlDbType.NVarChar,  100),
                new SqlParameter("@ScoreType",        SqlDbType.Int,         4),
                new SqlParameter("@Description",      SqlDbType.VarChar,   500),
                new SqlParameter("@Status",           SqlDbType.Int,         4),
                new SqlParameter("@DeadItemNum",      SqlDbType.Int,         4),
                new SqlParameter("@NoDeadItemNum",    SqlDbType.Int,         4),
                new SqlParameter("@CreateTime",       SqlDbType.DateTime),
                new SqlParameter("@CreateUserID",     SqlDbType.Int,         4),
                new SqlParameter("@LastModifyTime",   SqlDbType.DateTime),
                new SqlParameter("@LastModifyUserID", SqlDbType.VarChar,    50),
                new SqlParameter("@HaveQAppraisal",   SqlDbType.Int,         4),
                new SqlParameter("@RegionID",         SqlDbType.VarChar, 10)
            };
            parameters[0].Direction = ParameterDirection.Output;
            parameters[1].Value     = model.Name;
            parameters[2].Value     = model.ScoreType;
            parameters[3].Value     = model.Description;
            parameters[4].Value     = model.Status;
            parameters[5].Value     = model.DeadItemNum;
            parameters[6].Value     = model.NoDeadItemNum;
            parameters[7].Value     = model.CreateTime;
            parameters[8].Value     = model.CreateUserID;
            parameters[9].Value     = model.LastModifyTime;
            parameters[10].Value    = model.LastModifyUserID;
            parameters[11].Value    = model.HaveQAppraisal;
            parameters[12].Value    = model.RegionID;

            SqlHelper.ExecuteNonQuery(CONNECTIONSTRINGS, CommandType.StoredProcedure, P_QS_RULESTABLE_INSERT, parameters);
            return((int)parameters[0].Value);
        }
        /// 评分表复审驳回
        /// <summary>
        /// 评分表复审驳回
        /// </summary>
        private void ScoreTableReject(out string msg, int userId)
        {
            msg = "";
            if (!string.IsNullOrEmpty(QS_RTID))
            {
                int valint = 0;
                if (int.TryParse(QS_RTID, out valint))
                {
                    Entities.QS_RulesTable model = BLL.QS_RulesTable.Instance.GetQS_RulesTable(valint);
                    model.Status = (Int32)Entities.QSRulesTableStatus.Unfinished;
                    BLL.QS_RulesTable.Instance.Update(model);
                    Entities.QS_ApprovalHistory historyModel = new Entities.QS_ApprovalHistory();
                    historyModel.ApprovalType   = Convert.ToInt32(Entities.QSApprovalType.TableAduit).ToString();
                    historyModel.ApprovalResult = 2;
                    historyModel.QS_RTID        = valint;
                    historyModel.Type           = "1";
                    historyModel.CreateTime     = System.DateTime.Now;
                    historyModel.CreateUserID   = userId;
                    BLL.QS_ApprovalHistory.Instance.Insert(historyModel);

                    //add by qizq 添加日志2013-5-8
                    StringBuilder sbStr = new StringBuilder();
                    sbStr.Append("评分表 " + model.Name + " 审核驳回");
                    BLL.Util.InsertUserLog(sbStr.ToString());
                }
            }
            else
            {
                msg = "评分表参数错误";
            }
        }
Exemple #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (!string.IsNullOrEmpty(QS_RID))
         {
             int intiy = 0;
             if (int.TryParse(QS_RID, out intiy))
             {
                 Entities.QS_Result model = BLL.QS_Result.Instance.GetQS_Result(intiy);
                 if (model != null)
                 {
                     Entities.QS_RulesTable QS_RulesTableModel = BLL.QS_RulesTable.Instance.GetQS_RulesTable(model.QS_RTID);
                     if (QS_RulesTableModel != null)
                     {
                         TableName = QS_RulesTableModel.Name;
                         if (QS_RulesTableModel.ScoreType == 2)
                         {
                             TableName += "(致命项数" + QS_RulesTableModel.DeadItemNum + ",非致命项数" + QS_RulesTableModel.NoDeadItemNum + ")";
                         }
                     }
                     this.QualityStandardViewID.QS_RTID = model.QS_RTID;
                     this.QualityStandardViewID.QS_RID  = model.QS_RID;
                     UCCallRecordView1.QS_RID           = model.QS_RID;
                     UCCallRecordView1.CallID           = model.CallID;
                     QualityStandardViewID.PageFrom     = PageFrom;
                     UCCallRecordView1.tableEndName     = tableEndName;
                 }
                 else
                 {
                     Response.Write(@"<script language='javascript'>javascript:alert('评分成绩不存在!');try {
          window.external.MethodScript('/browsercontrol/closepage');
     } catch (e) {
         window.opener = null; window.open('', '_self'); window.close();
     };</script>");
                 }
             }
             else
             {
                 Response.Write(@"<script language='javascript'>javascript:alert('评分成绩主键数据格式不正确!');try {
          window.external.MethodScript('/browsercontrol/closepage');
     } catch (e) {
         window.opener = null; window.open('', '_self'); window.close();
     };</script>");
             }
         }
         else
         {
             Response.Write(@"<script language='javascript'>javascript:alert('请求参数错误!');try {
          window.external.MethodScript('/browsercontrol/closepage');
     } catch (e) {
         window.opener = null; window.open('', '_self'); window.close();
     };</script>");
         }
     }
 }
Exemple #6
0
        //评分表删除 插入日志
        private void rulesTableinsertLog(Entities.QS_RulesTable oldModel)
        {
            string userLogStr = string.Empty;
            string logStr     = string.Empty;

            Hashtable ht_FieldName = new Hashtable();

            ht_FieldName.Add("QS_RTID", "主键");
            ht_FieldName.Add("Name", "评分表名称");
            ht_FieldName.Add("ScoreType", "评分表类型");
            ht_FieldName.Add("Description", "评分表描述");
            ht_FieldName.Add("Status", "评分表状态");
            ht_FieldName.Add("DeadItemNum", "致命项数");
            ht_FieldName.Add("NoDeadItemNum", "非致命项数");
            ht_FieldName.Add("CreateTime", "创建时间");
            ht_FieldName.Add("CreateUserID", "创建人");
            ht_FieldName.Add("LastModifyTime", "最后修改时间");
            ht_FieldName.Add("LastModifyUserID", "最后修改人");
            ht_FieldName.Add("HaveQAppraisal", "是否有质检评价");

            BLL.GetLogDesc.ht_FieldName = ht_FieldName;

            Hashtable ht_FieldType = new Hashtable();

            Hashtable ht1 = new Hashtable();

            ht1.Add("1", "评分型");
            ht1.Add("2", "合格型");
            Hashtable ht2 = new Hashtable();

            ht2.Add("10001", "未完成");
            ht2.Add("10002", "未审核");
            ht2.Add("10003", "已完成");
            Hashtable ht3 = new Hashtable();

            ht3.Add("0", "没有");
            ht3.Add("1", "有");

            ht_FieldType.Add("ScoreType", ht1);
            ht_FieldType.Add("Status", ht2);
            ht_FieldType.Add("CreateUserID", "UserID");
            ht_FieldType.Add("LastModifyUserID", "UserID");
            ht_FieldType.Add("HaveQAppraisal", ht3);

            BLL.GetLogDesc.ht_FieldType = ht_FieldType;

            //插入日志
            BLL.GetLogDesc.getDeleteLogInfo(oldModel, out userLogStr);

            logStr = "评分表信息删除:" + userLogStr;

            BLL.Util.InsertUserLog(logStr);
        }
Exemple #7
0
        //获取该评分表的评分表类型;1-评分型;2-合格型
        private string getTableType(int rtid)
        {
            string type = string.Empty;

            Entities.QS_RulesTable model = BLL.QS_RulesTable.Instance.GetQS_RulesTable(rtid);
            if (model != null)
            {
                type = model.ScoreType.ToString();
            }

            return(type);
        }
Exemple #8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         userId = BLL.Util.GetLoginUserID();
         if (!BLL.Util.CheckRight(userId, "SYS024BUT600405"))
         {
             Response.Write(BLL.Util.GetNotAccessMsgPage("您没有访问该页面的权限"));
             Response.End();
         }
         if (QS_RTID != 0 && CSID != 0)
         {
             if (QS_RID <= 0)
             {
                 QS_RID = BLL.QS_IM_Result.Instance.GetRidByCsidAndRtid(QS_RTID, CSID);
             }
             DataRow dr = BLL.QS_IM_Result.Instance.GetQS_IM_ResultForCSID(CSID.ToString());
             Entities.QS_RulesTable tablemodel = BLL.QS_RulesTable.Instance.GetQS_RulesTable(QS_RTID);
             if (tablemodel != null && dr != null)
             {
                 //设置标题
                 TableName = tablemodel.Name;
                 if (tablemodel.ScoreType == 2)
                 {
                     TableName += "(致命项数" + tablemodel.DeadItemNum + ",非致命项数" + tablemodel.NoDeadItemNum + ")";
                 }
                 //状态校验
                 int Result_Status = CommonFunction.ObjectToInteger(dr["Result_Status"]);
                 if (Result_Status == (int)QSResultStatus.WaitScore)
                 {
                     QualityStandardEditID.QS_RTID = QS_RTID;
                     QualityStandardEditID.QS_RID  = QS_RID;
                     QualityStandardEditID.CallID  = -1;
                     QualityStandardEditID.CSID    = CSID;
                     UCConversationsViewID.CSID    = CSID.ToString();
                 }
                 else
                 {
                     AlertMessage("当前评分成绩不是待评分状态");
                 }
             }
             else
             {
                 AlertMessage("评分表不存在或对话不存在");
             }
         }
         else
         {
             AlertMessage("页面请求参数不正确");
         }
     }
 }
        //获取该评分表的评分表类型;1-评分型;2-合格型;3.五级质检
        private string getTableType(int rtid, out int[] nums)
        {
            nums = new int[2];
            string type = string.Empty;

            Entities.QS_RulesTable model = BLL.QS_RulesTable.Instance.GetQS_RulesTable(rtid);
            if (model != null)
            {
                type    = model.ScoreType.ToString();
                nums[0] = model.DeadItemNum.HasValue ? model.DeadItemNum.Value : 0;
                nums[1] = model.NoDeadItemNum.HasValue ? model.NoDeadItemNum.Value : 0;
            }
            return(type);
        }
Exemple #10
0
        private Entities.QS_RulesTable LoadSingleQS_RulesTable(DataRow row)
        {
            Entities.QS_RulesTable model = new Entities.QS_RulesTable();

            if (row["QS_RTID"].ToString() != "")
            {
                model.QS_RTID = int.Parse(row["QS_RTID"].ToString());
            }
            model.Name = row["Name"].ToString();
            if (row["ScoreType"].ToString() != "")
            {
                model.ScoreType = int.Parse(row["ScoreType"].ToString());
            }
            model.Description = row["Description"].ToString();
            if (row["Status"].ToString() != "")
            {
                model.Status = int.Parse(row["Status"].ToString());
            }
            if (row["isInUse"].ToString() != "")
            {
                model.StatusInUse = int.Parse(row["isInUse"].ToString());
            }
            if (row["DeadItemNum"].ToString() != "")
            {
                model.DeadItemNum = int.Parse(row["DeadItemNum"].ToString());
            }
            if (row["NoDeadItemNum"].ToString() != "")
            {
                model.NoDeadItemNum = int.Parse(row["NoDeadItemNum"].ToString());
            }
            if (row["CreateTime"].ToString() != "")
            {
                model.CreateTime = DateTime.Parse(row["CreateTime"].ToString());
            }
            if (row["CreateUserID"].ToString() != "")
            {
                model.CreateUserID = int.Parse(row["CreateUserID"].ToString());
            }
            if (row["LastModifyTime"].ToString() != "")
            {
                model.LastModifyTime = DateTime.Parse(row["LastModifyTime"].ToString());
            }
            model.LastModifyUserID = row["LastModifyUserID"].ToString();
            if (row["HaveQAppraisal"].ToString() != "")
            {
                model.HaveQAppraisal = int.Parse(row["HaveQAppraisal"].ToString());
            }
            model.RegionID = row["RegionID"].ToString();
            return(model);
        }
Exemple #11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (!string.IsNullOrEmpty(QS_RTID))
         {
             int intiy = 0;
             if (int.TryParse(QS_RTID, out intiy))
             {
                 Entities.QS_RulesTable tableModel = BLL.QS_RulesTable.Instance.GetQS_RulesTable(intiy);
                 if (tableModel != null)
                 {
                     TableName = tableModel.Name;
                     if (tableModel.ScoreType == 2)
                     {
                         TableName += "(致命项数" + tableModel.DeadItemNum + ",非致命项数" + tableModel.NoDeadItemNum + ")";
                     }
                     this.ScoreTableViewID.Qs_RTID = intiy;
                 }
                 else
                 {
                     Response.Write(@"<script language='javascript'>javascript:alert('评分表不存在!');try {
          window.external.MethodScript('/browsercontrol/closepage');
     } catch (e) {
         window.opener = null; window.open('', '_self'); window.close();
     };</script>");
                 }
             }
             else
             {
                 Response.Write(@"<script language='javascript'>javascript:alert('评分表主键数据格式不正确!');try {
          window.external.MethodScript('/browsercontrol/closepage');
     } catch (e) {
         window.opener = null; window.open('', '_self'); window.close();
     };</script>");
             }
         }
         else
         {
             Response.Write(@"<script language='javascript'>javascript:alert('评分表不存在!');try {
          window.external.MethodScript('/browsercontrol/closepage');
     } catch (e) {
         window.opener = null; window.open('', '_self'); window.close();
     };</script>");
         }
     }
 }
Exemple #12
0
        private void BindData()
        {
            int rtid = 0;

            if (int.TryParse(QS_RTID, out rtid))
            {
                Entities.QS_RulesTable QsTable = BLL.QS_RulesTable.Instance.GetQS_RulesTable(rtid);
                if (QsTable != null)
                {
                    Status      = QsTable.Status.ToString();
                    StatusInUse = QsTable.StatusInUse.ToString();
                    region      = QsTable.RegionID;
                    string JsonStr = GetJsonStrByRtid(rtid);
                    this.hidJsonStr.Value = JsonStr;
                }
            }
        }
Exemple #13
0
        //废弃 强斐 2015-4-15
        //private void RangeManage(out string msg)
        //{
        //    //判断该分组是否存在,存在则修改;不存在则插入新纪录
        //    msg = string.Empty;

        //    string[] rangeStr = RangeStr.Split('|');
        //    for (int i = 0; i < rangeStr.Length; i++)
        //    {
        //        string[] itemStr = rangeStr[i].Split('$');
        //        if (itemStr.Length == 2)
        //        {
        //            int _bgid;
        //            if (!int.TryParse(itemStr[0], out _bgid))
        //            {
        //                msg = "分组ID有误";
        //                return;
        //            }
        //            int _qs_rtid;
        //            if (!int.TryParse(itemStr[1], out _qs_rtid))
        //            {
        //                msg = "评分表ID有误";
        //                return;
        //            }
        //            Entities.QS_RulesRange old_Model = BLL.QS_RulesRange.Instance.getModelByBGID(_bgid);

        //            int result = BLL.QS_RulesRange.Instance.RangeManage(_bgid, _qs_rtid);

        //            Entities.QS_RulesRange new_Model = BLL.QS_RulesRange.Instance.getModelByBGID(_bgid);

        //            insertLog(old_Model, new_Model);

        //            msg = "操作成功";
        //        }
        //    }
        //}

        /// 删除评分表
        /// <summary>
        /// 删除评分表
        /// </summary>
        /// <param name="msg"></param>
        private void deleteRulesTable(out string msg)
        {
            msg = string.Empty;
            int _QS_RTID;

            if (!int.TryParse(QS_RTID, out _QS_RTID))
            {
                msg = "评分表ID有误";
                return;
            }

            Entities.QS_RulesTable oldModel = BLL.QS_RulesTable.Instance.GetQS_RulesTable(_QS_RTID);

            BLL.QS_RulesTable.Instance.Delete(_QS_RTID);

            rulesTableinsertLog(oldModel);

            msg = "操作成功";
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (!string.IsNullOrEmpty(QS_RID))
         {
             QS_IM_ResultInfo info = CommonBll.Instance.GetComAdoInfo <QS_IM_ResultInfo>(CommonFunction.ObjectToInteger(QS_RID));
             if (info != null)
             {
                 int QS_RTID = info.ValueOrDefault_QS_RTID;
                 int CSID    = (int)info.ValueOrDefault_CSID;
                 Entities.QS_RulesTable tablemodel = BLL.QS_RulesTable.Instance.GetQS_RulesTable(QS_RTID);
                 if (tablemodel != null)
                 {
                     //设置标题
                     TableName = tablemodel.Name;
                     if (tablemodel.ScoreType == 2)
                     {
                         TableName += "(致命项数" + tablemodel.DeadItemNum + ",非致命项数" + tablemodel.NoDeadItemNum + ")";
                     }
                     //设置页面
                     QualityStandardViewID.QS_RTID  = QS_RTID;
                     QualityStandardViewID.PageFrom = PageFrom;
                     QualityStandardViewID.QS_RID   = CommonFunction.ObjectToInteger(QS_RID);
                     UCConversationsViewID.CSID     = CSID.ToString();
                 }
             }
             else
             {
                 AlertMessage("评分成绩不存在");
             }
         }
         else
         {
             AlertMessage("请求参数错误");
         }
     }
 }
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public int Update(SqlTransaction sqltran, Entities.QS_RulesTable model)
 {
     return(Dal.QS_RulesTable.Instance.Update(sqltran, model));
 }
Exemple #16
0
        private void VerifyData()
        {
            string sysId  = ConfigurationUtil.GetAppSettingValue("ThisSysID");
            int    userId = BLL.Util.GetLoginUserID();

            FirstTrialButton = BitAuto.YanFa.SysRightManager.Common.UserInfo.Instance.CheckRight("SYS024BUT600102", sysId, userId);
            RecheckButton    = BitAuto.YanFa.SysRightManager.Common.UserInfo.Instance.CheckRight("SYS024BUT600103", sysId, userId);
            AppealButton     = BitAuto.YanFa.SysRightManager.Common.UserInfo.Instance.CheckRight("SYS024BUT600106", sysId, userId);

            int rid = 0;

            if (int.TryParse(RequestQS_RID, out rid))
            {
                Entities.QS_Result info = BLL.QS_Result.Instance.GetQS_Result(rid);
                if (info != null)
                {
                    //由于易湃外呼业务签入cc系统,易湃不入库CallRecordInfo表,所以此处改成从CallRecord_ORIG_Business取录音创建坐席 modify by qizq 2014-4-17
                    Entities.CallRecord_ORIG_Business callRecordInfo = BLL.CallRecord_ORIG_Business.Instance.GetByCallID(Convert.ToInt64(info.CallID), tableEndName);
                    //Entities.CallRecordInfo callRecordInfo = BLL.CallRecordInfo.Instance.GetCallRecordInfoByCallID(info.CallID);
                    if (callRecordInfo != null)
                    {
                        //判断单据状态,如果不是待复审,不能复审
                        Entities.QS_RulesTable QS_RulesTableModel = BLL.QS_RulesTable.Instance.GetQS_RulesTable(info.QS_RTID);
                        if (QS_RulesTableModel != null)
                        {
                            TableName = QS_RulesTableModel.Name;
                            if (QS_RulesTableModel.ScoreType == 2)
                            {
                                TableName += "(致命项数" + QS_RulesTableModel.DeadItemNum + ",非致命项数" + QS_RulesTableModel.NoDeadItemNum + ")";
                            }
                        }

                        //如果具有申诉权限,并且当前人不是此录音的创建人员,关闭此页面
                        if (AppealButton && callRecordInfo.CreateUserID != BLL.Util.GetLoginUserID() & !RecheckButton & !AppealButton)
                        {
                            Response.Write(@"<script language='javascript'>alert('您没有权限查看此评分!');try {
                  window.external.MethodScript('/browsercontrol/closepage');
            } catch (e) {
                window.opener = null; window.open('', '_self'); window.close();
            };</script>");
                        }
                        //如果不是本人录音,申诉按钮不显示
                        if (AppealButton && callRecordInfo.CreateUserID != BLL.Util.GetLoginUserID())
                        {
                            AppealButton = false;
                        }
                        this.ucCallRecordView.QS_RID       = info.QS_RID;
                        this.ucCallRecordView.CallID       = info.CallID;
                        this.ucCallRecordView.tableEndName = tableEndName;
                    }
                    Status = info.Status.ToString();
                    switch (Status)
                    {
                    case "20003":
                        Title = "录音质检成绩初审";
                        this.UCScoreTableView.QS_RID  = info.QS_RID;
                        this.UCScoreTableView.QS_RTID = info.QS_RTID;
                        break;

                    case "20004":
                        Title = "录音质检成绩复审";
                        this.ucTableDispose.CallID  = info.CallID;
                        this.ucTableDispose.QS_RID  = info.QS_RID;
                        this.ucTableDispose.QS_RTID = info.QS_RTID;
                        break;

                    default:
                        Title = "录音质检成绩查看";
                        this.UCScoreTableView.QS_RID  = info.QS_RID;
                        this.UCScoreTableView.QS_RTID = info.QS_RTID;
                        break;
                    }
                }
                else
                {
                    Response.Write(@"<script language='javascript'>alert('不存在此评分!');try {
                  window.external.MethodScript('/browsercontrol/closepage');
            } catch (e) {
                window.opener = null; window.open('', '_self',''); window.close();
            };</script>");
                }
            }
            else
            {
                Response.Write(@"<script language='javascript'>alert('参数有误!');try {
                  window.external.MethodScript('/browsercontrol/closepage');
            } catch (e) {
                window.opener = null; window.open('', '_self',''); window.close();
            };</script>");
            }
        }
Exemple #17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int userId = BLL.Util.GetLoginUserID();
                if (!BLL.Util.CheckRight(userId, "SYS024BUT600104"))
                {
                    Response.Write(BLL.Util.GetNotAccessMsgPage("您没有访问该页面的权限"));
                    Response.End();
                }
                if (QS_RTID != 0 && CallID != 0)
                {
                    if (QS_RID <= 0)
                    {
                        QS_RID = BLL.QS_Result.Instance.GetRidByCallidAndRtid(QS_RTID, CallID);
                    }

                    Entities.QS_RulesTable tablemodel = BLL.QS_RulesTable.Instance.GetQS_RulesTable(QS_RTID);
                    //由于易湃外呼业务录音不入CC的CallRecordInfo表,所以取CallRecord_ORIG_Business来判断录音是否存在 modify by qizq 2014-4-17
                    //Entities.CallRecordInfo callmodel = BLL.CallRecordInfo.Instance.GetCallRecordInfoByCallID(CallID);
                    Entities.CallRecord_ORIG_Business callmodel = BLL.CallRecord_ORIG_Business.Instance.GetByCallID(CallID, tableEndName);
                    if (tablemodel != null && callmodel != null)
                    {
                        TableName = tablemodel.Name;
                        if (tablemodel.ScoreType == 2)
                        {
                            TableName += "(致命项数" + tablemodel.DeadItemNum + ",非致命项数" + tablemodel.NoDeadItemNum + ")";
                        }
                        bool flag = true;
                        if (QS_RID != 0)
                        {
                            Entities.QS_Result modelQS_Result = BLL.QS_Result.Instance.GetQS_Result(QS_RID);
                            if (modelQS_Result != null && modelQS_Result.Status == (Int32)Entities.QSResultStatus.WaitScore)
                            {
                            }
                            else
                            {
                                flag = false;
                            }
                        }
                        if (flag)
                        {
                            QualityStandardEditID.QS_RTID  = QS_RTID;
                            QualityStandardEditID.QS_RID   = QS_RID;
                            QualityStandardEditID.CallID   = CallID;
                            UCCallRecordView1.QS_RID       = QS_RID;
                            UCCallRecordView1.CallID       = CallID;
                            UCCallRecordView1.tableEndName = tableEndName;
                        }
                        else
                        {
                            Response.Write(@"<script language='javascript'>javascript:alert('当前评分成绩不是待评分状态!');try {
                 window.external.MethodScript('/browsercontrol/closepage');
            } catch (e) {
                window.opener = null; window.open('', '_self'); window.close();
            };</script>");
                        }
                    }
                    else
                    {
                        Response.Write(@"<script language='javascript'>javascript:alert('评分表不存在或录音不存在!');try {
                 window.external.MethodScript('/browsercontrol/closepage');
            } catch (e) {
                window.opener = null; window.open('', '_self'); window.close();
            };</script>");
                    }
                }
                else
                {
                    Response.Write(@"<script language='javascript'>javascript:alert('页面请求参数不正确!');try {
                 window.external.MethodScript('/browsercontrol/closepage');
            } catch (e) {
                window.opener = null; window.open('', '_self'); window.close();
            };</script>");
                }
            }
        }
Exemple #18
0
        private void Submit(out string msg, int userID, out string returnRTID)
        {
            msg        = "";
            returnRTID = "";

            #region 定义变量

            string         datainfoStr = DataStr;
            ScoreTableInfo tempInfoData;

            Entities.QS_RulesTable      QsTable;
            Entities.QS_Category        QsCategory;
            Entities.QS_Item            QsItem;
            Entities.QS_Standard        QsStandard;
            Entities.QS_Marking         QsMarking;
            Entities.QS_DeadOrAppraisal Qsdead;


            List <Entities.QS_Category>        QsCategoryList = new List <Entities.QS_Category>();
            List <Entities.QS_Item>            QsItemList     = new List <Entities.QS_Item>();
            List <Entities.QS_Standard>        QsStandardList = new List <Entities.QS_Standard>();
            List <Entities.QS_Marking>         QsMarkingList  = new List <Entities.QS_Marking>();
            List <Entities.QS_DeadOrAppraisal> QsDeadList     = new List <Entities.QS_DeadOrAppraisal>();

            #endregion

            tempInfoData = (ScoreTableInfo)Newtonsoft.Json.JavaScriptConvert.DeserializeObject(datainfoStr, typeof(ScoreTableInfo));

            #region 验证数据
            //判断是否是提交,提交才验证,add by qizq
            if (ActionType == "Submit")
            {
                CheckMsg(tempInfoData, out msg);

                if (msg != "")
                {
                    return;
                }
            }
            //
            #endregion

            #region 准备数据

            #region 评分表

            QsTable             = new Entities.QS_RulesTable();
            QsTable.QS_RTID     = int.Parse(tempInfoData.RTID);
            QsTable.Name        = tempInfoData.Name;
            QsTable.ScoreType   = int.Parse(tempInfoData.ScoreType);
            QsTable.Description = tempInfoData.Description;

            QsTable.DeadItemNum      = int.Parse(tempInfoData.DeadItemNum);
            QsTable.NoDeadItemNum    = int.Parse(tempInfoData.NoDeadItemNum);
            QsTable.HaveQAppraisal   = int.Parse(tempInfoData.Appraisal);
            QsTable.LastModifyTime   = DateTime.Now;
            QsTable.LastModifyUserID = userID.ToString();
            QsTable.RegionID         = tempInfoData.RegionID;

            if (QsTable.QS_RTID < 0)
            {
                if (BLL.QS_RulesTable.Instance.IsRuleTableNameExist(QsTable.Name, QsTable.ScoreType))
                {
                    msg = "评分表名称[" + QsTable.Name + "]已经存在,不能重复添加!";
                    return;
                }
            }

            //add by qizq 添加日志2013-5-8
            StringBuilder sbStr = new StringBuilder();

            if (ActionType == "Submit")
            {
                sbStr.Append("提交评分表 " + QsTable.Name);
                QsTable.Status = (int)Entities.QSRulesTableStatus.Audit;
            }
            else
            {
                sbStr.Append("保存评分表 " + QsTable.Name);
                QsTable.Status = (int)Entities.QSRulesTableStatus.Unfinished;
            }

            #endregion

            #region 评分分类

            if (tempInfoData.Catage != null)
            {
                foreach (Catage catageInfo in tempInfoData.Catage)
                {
                    QsCategory                  = new Entities.QS_Category();
                    QsCategory.QS_CID           = int.Parse(catageInfo.CID);
                    QsCategory.QS_RTID          = int.Parse(tempInfoData.RTID);//评分表的值
                    QsCategory.Name             = catageInfo.Name;
                    QsCategory.Score            = int.Parse(catageInfo.Score);
                    QsCategory.Status           = int.Parse(catageInfo.Status);
                    QsCategory.ScoreType        = int.Parse(tempInfoData.ScoreType); //评分表的值
                    QsCategory.LastModifyTime   = DateTime.Now;
                    QsCategory.LastModifyUserID = userID;

                    QsCategoryList.Add(QsCategory);

                    #region 质检项目

                    if (catageInfo.Item != null)
                    {
                        foreach (Item itemInfo in catageInfo.Item)
                        {
                            QsItem                  = new Entities.QS_Item();
                            QsItem.QS_IID           = int.Parse(itemInfo.IID);
                            QsItem.QS_CID           = int.Parse(catageInfo.CID);
                            QsItem.QS_RTID          = int.Parse(tempInfoData.RTID);
                            QsItem.ItemName         = itemInfo.ItemName;
                            QsItem.ScoreType        = int.Parse(tempInfoData.ScoreType);
                            QsItem.Score            = decimal.Parse(itemInfo.Score);
                            QsItem.Status           = int.Parse(itemInfo.Status);
                            QsItem.LastModifyTime   = DateTime.Now;
                            QsItem.LastModifyUserID = userID;

                            QsItemList.Add(QsItem);

                            #region 质检标准

                            if (itemInfo.Standard != null)
                            {
                                foreach (Standard standardInfo in itemInfo.Standard)
                                {
                                    if (standardInfo.Score.Trim() != "" && standardInfo.SName.Trim() != "") //&& standardInfo.Status.Trim() == "0"
                                    {
                                        QsStandard                     = new Entities.QS_Standard();
                                        QsStandard.QS_SID              = int.Parse(standardInfo.SID);
                                        QsStandard.QS_IID              = int.Parse(itemInfo.IID);
                                        QsStandard.QS_CID              = int.Parse(catageInfo.CID);
                                        QsStandard.QS_RTID             = int.Parse(tempInfoData.RTID);
                                        QsStandard.ScoringStandardName = standardInfo.SName;
                                        QsStandard.ScoreType           = int.Parse(tempInfoData.ScoreType);
                                        QsStandard.Score               = decimal.Parse(standardInfo.Score);
                                        QsStandard.IsIsDead            = string.IsNullOrEmpty(standardInfo.IsIsDead) ? -2 : int.Parse(standardInfo.IsIsDead);
                                        QsStandard.Status              = int.Parse(standardInfo.Status);
                                        QsStandard.LastModifyTime      = DateTime.Now;
                                        QsStandard.LastModifyUserID    = userID;

                                        QsStandard.QS_SExplanation = standardInfo.SExplanation;
                                        QsStandard.QS_SkillLevel   = standardInfo.SkillLevel == null ? Constant.INT_INVALID_VALUE: int.Parse(standardInfo.SkillLevel);

                                        QsStandardList.Add(QsStandard);
                                    }

                                    #region 扣分项

                                    if (standardInfo.Marking != null && tempInfoData.ScoreType.Trim() != "3")
                                    {
                                        foreach (Marking markInfo in standardInfo.Marking)
                                        {
                                            QsMarking = new Entities.QS_Marking();

                                            QsMarking.QS_MID          = int.Parse(markInfo.MID);
                                            QsMarking.QS_RTID         = int.Parse(tempInfoData.RTID);
                                            QsMarking.QS_CID          = int.Parse(catageInfo.CID);
                                            QsMarking.QS_IID          = int.Parse(itemInfo.IID);
                                            QsMarking.QS_SID          = int.Parse(standardInfo.SID);
                                            QsMarking.ScoreType       = int.Parse(tempInfoData.ScoreType);
                                            QsMarking.MarkingItemName = markInfo.MName;
                                            QsMarking.Score           = int.Parse(markInfo.Score);
                                            QsMarking.Status          = int.Parse(markInfo.Status);

                                            QsMarkingList.Add(QsMarking);
                                        }
                                    }

                                    #endregion
                                }
                            }


                            #endregion
                        }
                    }

                    #endregion
                }
            }

            #endregion

            #region 致命项

            if (tempInfoData.Dead != null)
            {
                foreach (Dead deadInfo in tempInfoData.Dead)
                {
                    Qsdead                  = new Entities.QS_DeadOrAppraisal();
                    Qsdead.QS_DAID          = int.Parse(deadInfo.DID);
                    Qsdead.QS_RTID          = int.Parse(tempInfoData.RTID);
                    Qsdead.DeadItemName     = deadInfo.DName;
                    Qsdead.Status           = int.Parse(deadInfo.Status);
                    Qsdead.LastModifyTime   = DateTime.Now;
                    Qsdead.LastModifyUserID = userID;

                    QsDeadList.Add(Qsdead);
                }
            }

            #endregion

            #endregion

            #region 提交到数据库

            string        connectionstrings = ConfigurationUtil.GetAppSettingValue("ConnectionStrings_CC");
            SqlConnection connection        = new SqlConnection(connectionstrings);
            connection.Open();
            SqlTransaction tran = connection.BeginTransaction(IsolationLevel.ReadUncommitted);
            //  SqlTransaction tran = connection.BeginTransaction("SampleTransaction");

            try
            {
                #region 保存评分表

                if (QsTable.QS_RTID < 0)
                {
                    //新增

                    QsTable.CreateTime   = DateTime.Now;
                    QsTable.CreateUserID = userID;
                    int retID = BLL.QS_RulesTable.Instance.Insert(tran, QsTable);
                    returnRTID = retID.ToString();

                    #region 修改各个表的评分表ID

                    foreach (Entities.QS_Category cItem in QsCategoryList)
                    {
                        if (cItem.QS_RTID == QsTable.QS_RTID)
                        {
                            cItem.QS_RTID = int.Parse(returnRTID);
                        }
                    }

                    foreach (Entities.QS_Item iItem in QsItemList)
                    {
                        if (iItem.QS_RTID == QsTable.QS_RTID)
                        {
                            iItem.QS_RTID = int.Parse(returnRTID);
                        }
                    }

                    foreach (Entities.QS_Standard sItem in QsStandardList)
                    {
                        if (sItem.QS_RTID == QsTable.QS_RTID)
                        {
                            sItem.QS_RTID = int.Parse(returnRTID);
                        }
                    }

                    foreach (Entities.QS_Marking mItem in QsMarkingList)
                    {
                        if (mItem.QS_RTID == QsTable.QS_RTID)
                        {
                            mItem.QS_RTID = int.Parse(returnRTID);
                        }
                    }

                    foreach (Entities.QS_DeadOrAppraisal dItem in QsDeadList)
                    {
                        if (dItem.QS_RTID == QsTable.QS_RTID)
                        {
                            dItem.QS_RTID = int.Parse(returnRTID);
                        }
                    }

                    #endregion
                }
                else
                {
                    //编辑
                    BLL.QS_RulesTable.Instance.Update(tran, QsTable);
                    returnRTID = QsTable.QS_RTID.ToString();
                }

                #endregion

                #region 保存分类

                foreach (Entities.QS_Category cItem in QsCategoryList)
                {
                    if (cItem.Status == -1)
                    {
                        //删除的
                        BLL.QS_Category.Instance.Delete(tran, cItem.QS_CID);
                        continue;
                    }

                    if (cItem.QS_CID < 0)
                    {
                        //新增
                        cItem.CreateTime   = DateTime.Now;
                        cItem.CreateUserID = userID;
                        int retCID = BLL.QS_Category.Instance.Insert(tran, cItem);

                        #region 修改各个表的分类ID

                        foreach (Entities.QS_Item iItem in QsItemList)
                        {
                            if (iItem.QS_CID == cItem.QS_CID)
                            {
                                iItem.QS_CID = retCID;
                            }
                        }

                        foreach (Entities.QS_Standard sItem in QsStandardList)
                        {
                            if (sItem.QS_CID == cItem.QS_CID)
                            {
                                sItem.QS_CID = retCID;
                            }
                        }

                        foreach (Entities.QS_Marking mItem in QsMarkingList)
                        {
                            if (mItem.QS_CID == cItem.QS_CID)
                            {
                                mItem.QS_CID = retCID;
                            }
                        }

                        #endregion
                    }
                    else
                    {
                        //编辑
                        BLL.QS_Category.Instance.Update(tran, cItem);
                    }
                }

                #endregion

                #region 保存项目

                foreach (Entities.QS_Item iItem in QsItemList)
                {
                    if (iItem.Status == -1)
                    {
                        //删除的
                        BLL.QS_Item.Instance.Delete(tran, iItem.QS_IID);
                        continue;
                    }

                    if (iItem.QS_IID < 0)
                    {
                        //新增
                        iItem.CreateTime   = DateTime.Now;
                        iItem.CreateUserID = userID;
                        int retIID = BLL.QS_Item.Instance.Insert(tran, iItem);

                        #region 修改各个表的项目ID

                        foreach (Entities.QS_Standard sItem in QsStandardList)
                        {
                            if (sItem.QS_IID == iItem.QS_IID)
                            {
                                sItem.QS_IID = retIID;
                            }
                        }

                        foreach (Entities.QS_Marking mItem in QsMarkingList)
                        {
                            if (mItem.QS_IID == iItem.QS_IID)
                            {
                                mItem.QS_IID = retIID;
                            }
                        }

                        #endregion
                    }
                    else
                    {
                        //编辑
                        BLL.QS_Item.Instance.Update(tran, iItem);
                    }
                }

                #endregion

                #region 保存质检标准

                foreach (Entities.QS_Standard sItem in QsStandardList)
                {
                    if (sItem.Status == -1)
                    {
                        //删除的
                        BLL.QS_Standard.Instance.Delete(tran, sItem.QS_SID);
                        continue;
                    }

                    if (sItem.QS_SID < 0 || (sItem.ScoreType == 3 && sItem.QS_SID <= 5))
                    {
                        //新增
                        sItem.CreateTime   = DateTime.Now;
                        sItem.CreateUserID = userID;
                        int retSID = BLL.QS_Standard.Instance.Insert(tran, sItem);

                        #region 修改各个表的项目ID
                        if (sItem.ScoreType != 3)
                        {
                            foreach (Entities.QS_Marking mItem in QsMarkingList)
                            {
                                if (mItem.QS_SID == sItem.QS_SID)
                                {
                                    mItem.QS_SID = retSID;
                                }
                            }
                        }
                        #endregion
                    }
                    else
                    {
                        //编辑
                        BLL.QS_Standard.Instance.Update(tran, sItem);
                    }
                }

                #endregion

                #region 保存评分扣分项

                foreach (Entities.QS_Marking mItem in QsMarkingList)
                {
                    if (mItem.Status == -1)
                    {
                        //删除的
                        BLL.QS_Marking.Instance.Delete(tran, mItem.QS_MID);
                        continue;
                    }

                    if (mItem.QS_MID < 0)
                    {
                        //新增
                        mItem.CreateTime   = DateTime.Now;
                        mItem.CreateUserID = userID;
                        BLL.QS_Marking.Instance.Insert(tran, mItem);
                    }
                    else
                    {
                        //编辑
                        BLL.QS_Marking.Instance.Update(tran, mItem);
                    }
                }

                #endregion

                #region 保存致命项

                foreach (Entities.QS_DeadOrAppraisal dItem in QsDeadList)
                {
                    if (dItem.Status == -1)
                    {
                        //删除的
                        BLL.QS_DeadOrAppraisal.Instance.Delete(tran, dItem.QS_DAID);
                        continue;
                    }

                    if (dItem.QS_DAID < 0)
                    {
                        //新增
                        dItem.CreateTime   = DateTime.Now;
                        dItem.CreateUserID = userID;
                        BLL.QS_DeadOrAppraisal.Instance.Insert(tran, dItem);
                    }
                    else
                    {
                        //编辑
                        BLL.QS_DeadOrAppraisal.Instance.Update(tran, dItem);
                    }
                }

                #endregion

                //add by qizq 保存日志 2013-5-8
                BLL.Util.InsertUserLog(tran, sbStr.ToString());

                tran.Commit();
            }
            catch (Exception ex)
            {
                if (tran.Connection != null)
                {
                    tran.Rollback();
                }
                msg = ex.Message.ToString();
            }
            finally
            {
                connection.Close();
            }


            #endregion
        }
Exemple #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //判断当前登录人是否有评分表复审权限
                right_export = BLL.Util.CheckRight(BLL.Util.GetLoginUserID(), "SYS024BUT600202");
                if (!right_export)
                {
                    Response.Write(@"<script language='javascript'>javascript:alert('您没有评分表审核权限!');try {
                 window.external.MethodScript('/browsercontrol/closepage');
            } catch (e) {
                window.opener = null; window.open('', '_self'); window.close();
            };</script>");
                }
                else
                {
                    //
                    if (!string.IsNullOrEmpty(QS_RTID))
                    {
                        int intiy = 0;
                        if (int.TryParse(QS_RTID, out intiy))
                        {
                            //判断单据状态,如果不是待复审,不能复审
                            Entities.QS_RulesTable QS_RulesTableModel = BLL.QS_RulesTable.Instance.GetQS_RulesTable(intiy);
                            if (QS_RulesTableModel.Status == 10002)
                            {
                                TableName = QS_RulesTableModel.Name;
                                if (QS_RulesTableModel.ScoreType == 2)
                                {
                                    TableName += "(致命项数" + QS_RulesTableModel.DeadItemNum + ",非致命项数" + QS_RulesTableModel.NoDeadItemNum + ")";
                                }

                                this.ScoreTableViewID.Qs_RTID = intiy;
                            }
                            else
                            {
                                Response.Write(@"<script language='javascript'>javascript:alert('该评分表不是待复审状态!');try {
                 window.external.MethodScript('/browsercontrol/closepage');
            } catch (e) {
                window.opener = null; window.open('', '_self'); window.close();
            };</script>");
                            }
                        }
                        else
                        {
                            Response.Write(@"<script language='javascript'>javascript:alert('评分表主键数据格式不正确!');try {
                 window.external.MethodScript('/browsercontrol/closepage');
            } catch (e) {
                window.opener = null; window.open('', '_self'); window.close();
            };</script>");
                        }
                    }
                    else
                    {
                        Response.Write(@"<script language='javascript'>javascript:alert('评分表不存在!');try {
                 window.external.MethodScript('/browsercontrol/closepage');
            } catch (e) {
                window.opener = null; window.open('', '_self'); window.close();
            };</script>");
                    }
                }
            }
        }
Exemple #20
0
        private void BindData()
        {
            if (!string.IsNullOrEmpty(QS_RID))
            {
                QS_IM_ResultInfo info = CommonBll.Instance.GetComAdoInfo <QS_IM_ResultInfo>(CommonFunction.ObjectToInteger(QS_RID));
                if (info != null)
                {
                    if (info.Status == 20004)
                    {
                        CanSeeMessage = true;
                    }
                    int QS_RTID = info.ValueOrDefault_QS_RTID;
                    CSID = (int)info.ValueOrDefault_CSID;

                    DataRow dr = BLL.QS_IM_Result.Instance.GetQS_IM_ResultForCSID(CSID.ToString());
                    Entities.QS_RulesTable tablemodel = BLL.QS_RulesTable.Instance.GetQS_RulesTable(QS_RTID);
                    if (tablemodel != null && dr != null)
                    {
                        //设置标题
                        TableName = tablemodel.Name;
                        if (tablemodel.ScoreType == 2)
                        {
                            TableName += "(致命项数" + tablemodel.DeadItemNum + ",非致命项数" + tablemodel.NoDeadItemNum + ")";
                        }

                        //如果具有申诉权限,并且当前人不是此对话的创建人员,关闭此页面
                        if (AppealButton && CommonFunction.ObjectToInteger(dr["AgentUserID"]) != BLL.Util.GetLoginUserID() & !RecheckButton & !AppealButton)
                        {
                            AlertMessage("您没有权限查看此评分");
                        }
                        //如果不是本人录音,申诉按钮不显示
                        if (AppealButton && CommonFunction.ObjectToInteger(dr["AgentUserID"]) != BLL.Util.GetLoginUserID())
                        {
                            AppealButton = false;
                        }
                        //显示对话
                        this.UCConversationsViewID.CSID = CSID.ToString();
                    }
                    //成绩表状态
                    Status = info.ValueOrDefault_Status.ToString();

                    switch (Status)
                    {
                    case "20003":
                        Title = "对话质检成绩初审";
                        this.UCScoreTableView.QS_RID   = CommonFunction.ObjectToInteger(QS_RID);
                        this.UCScoreTableView.QS_RTID  = QS_RTID;
                        this.UCScoreTableView.PageFrom = "im";
                        break;

                    case "20004":
                        Title = "对话质检成绩复审";
                        this.ucTableDispose.CallID  = -1;
                        this.ucTableDispose.CSID    = CSID;
                        this.ucTableDispose.QS_RID  = CommonFunction.ObjectToInteger(QS_RID);
                        this.ucTableDispose.QS_RTID = QS_RTID;
                        break;

                    default:
                        Title = "对话质检成绩查看";
                        this.UCScoreTableView.QS_RID   = CommonFunction.ObjectToInteger(QS_RID);
                        this.UCScoreTableView.QS_RTID  = QS_RTID;
                        this.UCScoreTableView.PageFrom = "cc";
                        break;
                    }
                }
                else
                {
                    AlertMessage("评分成绩不存在");
                }
            }
            else
            {
                AlertMessage("请求参数错误");
            }
        }
Exemple #21
0
        private string GetJsonStrByDataTable(Entities.QS_RulesTable QsObject, DataTable DtCategory, DataTable DtItem,
                                             DataTable DtStandard, DataTable DtMarking, DataTable DtDead)
        {
            string jsonStr = "";

            ScoreTableInfo tableObj = new ScoreTableInfo();

            Catage[] Catage = new Catage[DtCategory.Rows.Count];

            Dead[] Dead = new Dead[DtDead.Rows.Count];

            //分类
            for (int ci = 0; ci < DtCategory.Rows.Count; ci++)
            {
                Catage[ci]        = new Catage();
                Catage[ci].CID    = DtCategory.Rows[ci]["QS_CID"].ToString();
                Catage[ci].Name   = DtCategory.Rows[ci]["Name"].ToString();
                Catage[ci].Score  = DtCategory.Rows[ci]["Score"].ToString();
                Catage[ci].Status = DtCategory.Rows[ci]["Status"].ToString();

                //质检项目
                DataRow[] IRows = DtItem.Select("QS_CID=" + DtCategory.Rows[ci]["QS_CID"].ToString());
                Item[]    Item  = new Item[IRows.Length];
                for (int ii = 0; ii < IRows.Length; ii++)
                {
                    Item[ii]          = new Item();
                    Item[ii].IID      = IRows[ii]["QS_IID"].ToString();
                    Item[ii].ItemName = IRows[ii]["ItemName"].ToString();
                    Item[ii].Score    = IRows[ii]["Score"].ToString();
                    Item[ii].Status   = IRows[ii]["Status"].ToString();
                    Item[ii].CID      = IRows[ii]["QS_CID"].ToString();

                    //质检标准
                    DataRow[]  SRows    = DtStandard.Select("QS_IID=" + IRows[ii]["QS_IID"].ToString());
                    Standard[] Standard = new Standard[SRows.Length];
                    for (int si = 0; si < SRows.Length; si++)
                    {
                        Standard[si]              = new Standard();
                        Standard[si].SID          = SRows[si]["QS_SID"].ToString();
                        Standard[si].IID          = SRows[si]["QS_IID"].ToString();
                        Standard[si].CID          = SRows[si]["QS_CID"].ToString();
                        Standard[si].SName        = SRows[si]["ScoringStandardName"].ToString();
                        Standard[si].Score        = SRows[si]["Score"].ToString();
                        Standard[si].IsIsDead     = SRows[si]["IsIsDead"].ToString();
                        Standard[si].Status       = SRows[si]["Status"].ToString();
                        Standard[si].SExplanation = SRows[si]["SExplanation"].ToString();
                        Standard[si].SkillLevel   = SRows[si]["SkillLevel"].ToString();

                        //扣分项
                        DataRow[] MRow    = DtMarking.Select("QS_SID=" + SRows[si]["QS_SID"].ToString());
                        Marking[] Marking = new Marking[MRow.Length];
                        for (int mi = 0; mi < MRow.Length; mi++)
                        {
                            Marking[mi]        = new Marking();
                            Marking[mi].CID    = MRow[mi]["QS_CID"].ToString();
                            Marking[mi].IID    = MRow[mi]["QS_IID"].ToString();
                            Marking[mi].SID    = MRow[mi]["QS_SID"].ToString();
                            Marking[mi].MID    = MRow[mi]["QS_MID"].ToString();
                            Marking[mi].MName  = MRow[mi]["MarkingItemName"].ToString();
                            Marking[mi].Score  = MRow[mi]["Score"].ToString();
                            Marking[mi].Status = MRow[mi]["Status"].ToString();
                        }
                        Standard[si].Marking = Marking;
                    }
                    Item[ii].Standard = Standard;
                }
                Catage[ci].Item = Item;
            }
            tableObj.Catage = Catage;

            //致命项
            for (int di = 0; di < DtDead.Rows.Count; di++)
            {
                Dead[di]        = new Dead();
                Dead[di].DID    = DtDead.Rows[di]["QS_DAID"].ToString();
                Dead[di].DName  = DtDead.Rows[di]["DeadItemName"].ToString();
                Dead[di].Status = DtDead.Rows[di]["Status"].ToString();
            }
            tableObj.Dead = Dead;

            //评价表的属性
            tableObj.RTID          = QsObject.QS_RTID.ToString();
            tableObj.Name          = QsObject.Name;
            tableObj.ScoreType     = QsObject.ScoreType.ToString();
            tableObj.Description   = QsObject.Description;
            tableObj.Status        = QsObject.Status.ToString();
            tableObj.Appraisal     = QsObject.HaveQAppraisal.ToString();
            tableObj.DeadItemNum   = QsObject.DeadItemNum.ToString();
            tableObj.NoDeadItemNum = QsObject.NoDeadItemNum.ToString();
            tableObj.RegionID      = QsObject.RegionID;

            jsonStr = Newtonsoft.Json.JavaScriptConvert.SerializeObject(tableObj);

            jsonStr = HttpContext.Current.Server.UrlEncode(jsonStr);
            jsonStr = jsonStr.Replace("+", "%20");

            return(jsonStr);
        }
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public int Update(Entities.QS_RulesTable model)
 {
     return(Dal.QS_RulesTable.Instance.Update(model));
 }
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Insert(Entities.QS_RulesTable model)
 {
     return(Dal.QS_RulesTable.Instance.Insert(model));
 }