Exemplo n.º 1
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Mod_TMB_FILE_NEXT_EMP model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into TMB_FILE_NEXT_EMP(");
            strSql.Append("C_FILE_ID,C_FLOW_ID,C_NEXT_EMP_ID,C_STEP_ID)");
            strSql.Append(" values (");
            strSql.Append(":C_FILE_ID,:C_FLOW_ID,:C_NEXT_EMP_ID,:C_STEP_ID)");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_FILE_ID",     OracleDbType.Varchar2, 100),
                new OracleParameter(":C_FLOW_ID",     OracleDbType.Varchar2, 100),
                new OracleParameter(":C_NEXT_EMP_ID", OracleDbType.Varchar2, 100),
                new OracleParameter(":C_STEP_ID",     OracleDbType.Varchar2, 100)
            };

            parameters[0].Value = model.C_FILE_ID;
            parameters[1].Value = model.C_FLOW_ID;
            parameters[2].Value = model.C_NEXT_EMP_ID;
            parameters[3].Value = model.C_STEP_ID;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Mod_TMB_FILE_NEXT_EMP DataRowToModel(DataRow row)
        {
            Mod_TMB_FILE_NEXT_EMP model = new Mod_TMB_FILE_NEXT_EMP();

            if (row != null)
            {
                if (row["C_ID"] != null)
                {
                    model.C_ID = row["C_ID"].ToString();
                }
                if (row["C_FILE_ID"] != null)
                {
                    model.C_FILE_ID = row["C_FILE_ID"].ToString();
                }
                if (row["C_FLOW_ID"] != null)
                {
                    model.C_FLOW_ID = row["C_FLOW_ID"].ToString();
                }
                if (row["C_NEXT_EMP_ID"] != null)
                {
                    model.C_NEXT_EMP_ID = row["C_NEXT_EMP_ID"].ToString();
                }
                if (row["C_REMARK"] != null)
                {
                    model.C_REMARK = row["C_REMARK"].ToString();
                }
                if (row["C_STEP_ID"] != null)
                {
                    model.C_STEP_ID = row["C_STEP_ID"].ToString();
                }
            }
            return(model);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 质量异议审批
        /// </summary>
        /// <param name="modFile">文件</param>
        /// <param name="modNextEmp">步骤操作人</param>
        /// <returns></returns>
        public bool ApproveQua(Mod_TMF_FILEINFO modFile, Mod_TMB_FILE_NEXT_EMP modNextEmp)
        {
            ArrayList arraySql = new ArrayList();

            #region //文件
            string        ID     = Guid.NewGuid().ToString("N");
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into TMF_FILEINFO(");
            strSql.Append("C_ID,");
            strSql.Append("C_FLOW_ID,");
            strSql.Append("C_EMP_ID,");
            strSql.Append("C_TITLE,");
            strSql.Append("C_CONTENT,");
            strSql.Append("N_TYPE,");
            strSql.Append("C_TASK_ID,");
            strSql.Append("C_STEP_ID");
            strSql.Append(")");
            strSql.Append(" values (");
            strSql.Append("'" + ID + "',");
            strSql.Append("'" + modFile.C_FLOW_ID + "',");
            strSql.Append("'" + modFile.C_EMP_ID + "',");
            strSql.Append("'" + modFile.C_TITLE + "',");
            strSql.Append("'" + modFile.C_CONTENT + "',");
            strSql.Append("" + modFile.N_TYPE + ",");
            strSql.Append("'" + modFile.C_TASK_ID + "',");
            strSql.Append("'" + modFile.C_STEP_ID + "'");
            strSql.Append(")");
            arraySql.Add(strSql.ToString());
            #endregion

            #region //更新质量异议反馈
            StringBuilder strSql2 = new StringBuilder();
            strSql2.Append("update TMQ_QUA_MAIN set ");
            strSql2.Append("C_FLOWID='" + modFile.C_FLOW_ID + "', ");
            strSql2.Append("N_STATUS=1, ");                                                              //1审批中
            strSql2.Append("C_CUST_MAKING='" + modFile.C_EMP_ID + "',");                                 //制单人
            strSql2.Append("D_CUST_MAKING_DT=to_date('" + DateTime.Now + "','yyyy-mm-dd hh24:mi:ss'),"); //制单时间
            strSql2.Append("C_APPROVEID='" + modNextEmp.C_NEXT_EMP_ID + "' ");                           //审批人
            strSql2.Append(" where C_ID='" + modFile.C_TASK_ID + "' ");
            arraySql.Add(strSql2.ToString());
            #endregion

            #region//步骤操作人
            StringBuilder strSql3 = new StringBuilder();
            strSql3.Append("insert into TMB_FILE_NEXT_EMP(");
            strSql3.Append("C_FILE_ID,");
            strSql3.Append("C_NEXT_EMP_ID,");
            strSql3.Append("C_STEP_ID");
            strSql3.Append(")");
            strSql3.Append(" values (");
            strSql3.Append("'" + ID + "',");
            strSql3.Append("'" + modNextEmp.C_NEXT_EMP_ID + "',");
            strSql3.Append("'" + modNextEmp.C_STEP_ID + "'");
            strSql3.Append(")");
            arraySql.Add(strSql3.ToString());
            #endregion

            return(DbHelperOra.ExecuteSqlTran(arraySql));
        }
Exemplo n.º 4
0
        /// <summary>
        /// 质量异议审批
        /// </summary>
        /// <param name="modFile">文件</param>
        /// <param name="modNextEmp">步骤操作人</param>
        /// <returns></returns>
        public bool ApproveQua(Mod_TMF_FILEINFO modFile, Mod_TMB_FILE_NEXT_EMP modNextEmp)
        {
            ArrayList arraySql = new ArrayList();

            #region //文件
            string        ID     = Guid.NewGuid().ToString("N");
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into TMF_FILEINFO(");
            strSql.Append("C_ID,");
            strSql.Append("C_FLOW_ID,");
            strSql.Append("C_EMP_ID,");
            strSql.Append("C_TITLE,");
            strSql.Append("C_CONTENT,");
            strSql.Append("N_TYPE,");
            strSql.Append("C_TASK_ID,");
            strSql.Append("C_STEP_ID");
            strSql.Append(")");
            strSql.Append(" values (");
            strSql.Append("'" + ID + "',");
            strSql.Append("'" + modFile.C_FLOW_ID + "',");
            strSql.Append("'" + modFile.C_EMP_ID + "',");
            strSql.Append("'" + modFile.C_TITLE + "',");
            strSql.Append("'" + modFile.C_CONTENT + "',");
            strSql.Append("" + modFile.N_TYPE + ",");
            strSql.Append("'" + modFile.C_TASK_ID + "',");
            strSql.Append("'" + modFile.C_STEP_ID + "'");
            strSql.Append(")");
            arraySql.Add(strSql.ToString());
            #endregion

            #region //更新质量异议反馈
            StringBuilder strSql2 = new StringBuilder();
            strSql2.Append("update TMC_ROLL_APPLY set ");
            strSql2.Append("C_STATUS='1', ");                                  //1审批中
            strSql2.Append("C_APPROVEID='" + modNextEmp.C_NEXT_EMP_ID + "' "); //审批人
            strSql2.Append(" where C_ID='" + modFile.C_TASK_ID + "' ");
            arraySql.Add(strSql2.ToString());
            #endregion

            #region//步骤操作人
            StringBuilder strSql3 = new StringBuilder();
            strSql3.Append("insert into TMB_FILE_NEXT_EMP(");
            strSql3.Append("C_FILE_ID,");
            strSql3.Append("C_NEXT_EMP_ID,");
            strSql3.Append("C_STEP_ID");
            strSql3.Append(")");
            strSql3.Append(" values (");
            strSql3.Append("'" + ID + "',");
            strSql3.Append("'" + modNextEmp.C_NEXT_EMP_ID + "',");
            strSql3.Append("'" + modNextEmp.C_STEP_ID + "'");
            strSql3.Append(")");
            arraySql.Add(strSql3.ToString());
            #endregion

            return(DbHelperOra.ExecuteSqlTran(arraySql));
        }
Exemplo n.º 5
0
        //提交申请
        protected void btnok_Click(object sender, EventArgs e)
        {
            try
            {
                if (!string.IsNullOrEmpty(hidEmpID.Value))
                {
                    //文件
                    Mod_TMF_FILEINFO modFile = new Mod_TMF_FILEINFO();
                    modFile.C_FLOW_ID = dropFlow.SelectedValue;//流程
                    modFile.C_EMP_ID  = ltlUserID.Text;
                    modFile.C_TITLE   = txtTitle.Text;
                    modFile.C_CONTENT = txtContent.Text;
                    modFile.N_TYPE    = 0;
                    modFile.C_TASK_ID = "";
                    modFile.C_STEP_ID = hidSetpID.Value;//步骤

                    //步骤操作人
                    Mod_TMB_FILE_NEXT_EMP modNextEmp = new Mod_TMB_FILE_NEXT_EMP();
                    modNextEmp.C_FILE_ID     = ID;
                    modNextEmp.C_NEXT_EMP_ID = hidEmpID.Value;
                    modNextEmp.C_STEP_ID     = hidSetpID.Value;

                    //if (tmo_con.ApproveCon(modFile, modNextEmp))
                    //{
                    //    WebMsg.MessageBox("提交成功", "ConList.aspx");
                    //}
                    //else
                    //{
                    //    WebMsg.MessageBox("提交失败");
                    //}
                }
                else
                {
                    WebMsg.MessageBox("请选择下一处理人");
                }
            }
            catch (Exception ex)
            {
                WebMsg.MessageBox(ex.Message);
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Mod_TMB_FILE_NEXT_EMP model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update TMB_FILE_NEXT_EMP set ");
            strSql.Append("C_FILE_ID=:C_FILE_ID,");
            strSql.Append("C_FLOW_ID=:C_FLOW_ID,");
            strSql.Append("C_NEXT_EMP_ID=:C_NEXT_EMP_ID,");
            strSql.Append("C_REMARK=:C_REMARK,");
            strSql.Append("C_STEP_ID=:C_STEP_ID");
            strSql.Append(" where C_ID=:C_ID ");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_FILE_ID",     OracleDbType.Varchar2, 100),
                new OracleParameter(":C_FLOW_ID",     OracleDbType.Varchar2, 100),
                new OracleParameter(":C_NEXT_EMP_ID", OracleDbType.Varchar2, 100),
                new OracleParameter(":C_REMARK",      OracleDbType.Varchar2, 200),
                new OracleParameter(":C_STEP_ID",     OracleDbType.Varchar2, 100),
                new OracleParameter(":C_ID",          OracleDbType.Varchar2, 100)
            };
            parameters[0].Value = model.C_FILE_ID;
            parameters[1].Value = model.C_FLOW_ID;
            parameters[2].Value = model.C_NEXT_EMP_ID;
            parameters[3].Value = model.C_REMARK;
            parameters[4].Value = model.C_STEP_ID;
            parameters[5].Value = model.C_ID;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 7
0
 //提交审批
 protected void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (!string.IsNullOrEmpty(hidEmpID.Value))
         {
             //文件
             Mod_TMF_FILEINFO modFile = new Mod_TMF_FILEINFO();
             modFile.C_FLOW_ID = dropFlow.SelectedValue;//流程
             modFile.C_EMP_ID  = ltlUserID.Text;
             modFile.C_TITLE   = txtTitle.Text;
             modFile.N_TYPE    = 2;               //资源
             modFile.C_TASK_ID = hidQualityID.Value;
             modFile.C_STEP_ID = hidSetpID.Value; //步骤
             //步骤操作人
             Mod_TMB_FILE_NEXT_EMP modNextEmp = new Mod_TMB_FILE_NEXT_EMP();
             modNextEmp.C_FILE_ID     = ID;
             modNextEmp.C_NEXT_EMP_ID = hidEmpID.Value;
             modNextEmp.C_STEP_ID     = hidSetpID.Value;
             if (tmc_roll_apply.ApproveQua(modFile, modNextEmp))
             {
                 WebMsg.MessageBox("提交成功", "myRoll.aspx");
             }
             else
             {
                 WebMsg.MessageBox("提交失败");
             }
         }
         else
         {
             WebMsg.MessageBox("请选择下一处理人");
         }
     }
     catch (Exception ex)
     {
         WebMsg.MessageBox(ex.Message);
     }
 }
Exemplo n.º 8
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Mod_TMB_FILE_NEXT_EMP GetModel(string C_ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select C_ID,C_FILE_ID,C_FLOW_ID,C_NEXT_EMP_ID,C_REMARK,C_STEP_ID from TMB_FILE_NEXT_EMP ");
            strSql.Append(" where C_ID=:C_ID ");
            OracleParameter[] parameters =
            {
                new OracleParameter(":C_ID", OracleDbType.Varchar2, 100)
            };
            parameters[0].Value = C_ID;

            Mod_TMB_FILE_NEXT_EMP model = new Mod_TMB_FILE_NEXT_EMP();
            DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 9
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Mod_TMB_FILE_NEXT_EMP model)
 {
     return(dal.Update(model));
 }
Exemplo n.º 10
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(Mod_TMB_FILE_NEXT_EMP model)
 {
     return(dal.Add(model));
 }
Exemplo n.º 11
0
 /// <summary>
 /// 质量异议审批
 /// </summary>
 /// <param name="modFile">文件</param>
 /// <param name="modNextEmp">步骤操作人</param>
 /// <returns></returns>
 public bool ApproveQua(Mod_TMF_FILEINFO modFile, Mod_TMB_FILE_NEXT_EMP modNextEmp)
 {
     return(dal.ApproveQua(modFile, modNextEmp));
 }