Example #1
0
        public bool UpdateTaskByPost(string strDeliveryXml, BLL.Basic.User.UserInfo userModel, ref string strErrMsg)
        {
            try
            {
                int iResult = 0;

                SqlParameter[] cmdParms = new SqlParameter[]
                {
                    new SqlParameter("deliveryinfo_xml", SqlDbType.Image),
                    new SqlParameter("strUserNo", SqlDbType.NVarChar),
                    //new SqlParameter("bResult", SqlDbType.Int,ParameterDirection.Output),
                    new SqlParameter("bResult", SqlDbType.Int),

                    new SqlParameter("strErrMsg", SqlDbType.NVarChar, 200, strErrMsg)
                };

                cmdParms[0].Value = strDeliveryXml;
                cmdParms[1].Value = userModel.UserNo;

                TOOL.WriteLogMethod.WriteLog("方法:UpdateTaskByPost---操作人:" + userModel.UserName + strDeliveryXml);
                OperationSql.ExecuteNonQuery2(CommandType.StoredProcedure, "p_updatetaskbypost", cmdParms);
                iResult   = Convert.ToInt32(cmdParms[2].Value.ToString());
                strErrMsg = cmdParms[3].Value.ToString();

                return(iResult == 1 ? true : false);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #2
0
        public bool UnLockTaskOperUser(string strTaskXml, BLL.Basic.User.UserInfo userModel, ref string strErrMsg)
        {
            try
            {
                int iResult = 0;

                SqlParameter[] cmdParms = new SqlParameter[]
                {
                    new SqlParameter("Task_xml", SqlDbType.Image),
                    new SqlParameter("strUserNo", SqlDbType.NVarChar),
                    //new SqlParameter("bResult", SqlDbType.Int,ParameterDirection.Output),
                    new SqlParameter("bResult", SqlDbType.Int),

                    //new SqlParameter("strErrMsg", SqlDbType.NVarChar,1000,strErrMsg,ParameterDirection.Output)
                    new SqlParameter("strErrMsg", SqlDbType.NVarChar, 1000, strErrMsg)
                };


                cmdParms[0].Value = strTaskXml;
                cmdParms[1].Value = userModel.UserNo;

                OperationSql.ExecuteNonQuery2(CommandType.StoredProcedure, "p_unlockoperuser", cmdParms);
                iResult   = Convert.ToInt32(cmdParms[2].Value.ToString());
                strErrMsg = cmdParms[3].Value.ToString();

                return(iResult == 1 ? true : false);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #3
0
 /// <summary>
 /// 锁定物料操作人
 /// </summary>
 /// <param name="taskDetailsMdl"></param>
 /// <param name="userMdl"></param>
 /// <returns></returns>
 public int LockTaskOperUser(TaskDetails_Model taskDetailsMdl, BLL.Basic.User.UserInfo userMdl)
 {
     try
     {
         string strSql = "update t_taskdetails set operatoruserno='{0}' where id = '{1}'";
         strSql = string.Format(strSql, userMdl.UserNo, taskDetailsMdl.ID);
         return(OperationSql.ExecuteNonQuery2(System.Data.CommandType.Text, strSql));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message + ex.TargetSite);
     }
 }
Example #4
0
 /// <summary>
 /// 查看物料被哪个用户锁定
 /// </summary>
 /// <param name="taskDetailsMdl"></param>
 /// <param name="userMdl"></param>
 /// <returns></returns>
 public string QueryUserNameByTaskDetails(TaskDetails_Model taskDetailsMdl, BLL.Basic.User.UserInfo userMdl)
 {
     try
     {
         string strUserName = string.Empty;
         string strSql      = "select b.UserName from t_taskdetails a left join t_user b on a.operatoruserno = b.userno where a.id = {0} " +
                              " and  a.operatoruserno!='{1}'";
         strSql = string.Format(strSql, taskDetailsMdl.ID, userMdl.UserNo);
         return((string)OperationSql.ExecuteScalar(System.Data.CommandType.Text, strSql));
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message + ex.TargetSite);
     }
 }
Example #5
0
        public bool CreateQuanlityReturnVoucher(string strQuanlityXml, ref string strReturnNo, BLL.Basic.User.UserInfo userModel, ref string strErrMsg)
        {
            try
            {
                int iResult = 0;

                SqlParameter[] cmdParms = new SqlParameter[]
                {
                    new SqlParameter("strQuanlityXml", SqlDbType.Image),
                    new SqlParameter("struserno", SqlDbType.NVarChar),
                    new SqlParameter("strreturnno", SqlDbType.NVarChar, 50, strReturnNo),
                    //new SqlParameter("bresult", SqlDbType.Int,ParameterDirection.Output),
                    new SqlParameter("bresult", SqlDbType.Int),

                    new SqlParameter("strerrmsg", SqlDbType.NVarChar, 100, strErrMsg)
                };

                cmdParms[0].Value = strQuanlityXml;
                cmdParms[1].Value = userModel.UserNo;


                OperationSql.ExecuteNonQuery2(CommandType.StoredProcedure, "p_createquanlityreturnvoucher", cmdParms);
                iResult     = Convert.ToInt32(cmdParms[3].Value.ToString());
                strReturnNo = cmdParms[2].Value.ToString();
                strErrMsg   = cmdParms[4].Value.ToString();

                return(iResult == 1 ? true : false);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }