Esempio n. 1
0
        public static bool InsertNew(PW_GROUP t_new)
        {
            DBHelper DBHelper_SqlServer = new DBLink();

            try
            {
                PW_GROUP      tt = t_new;
                StringBuilder sb = new StringBuilder();
                sb.Append(" Insert into PW_GROUP (  ");
                sb.Append("ID, ");
                sb.Append("GROUPNAME, ");
                sb.Append("GROUPDESCRIBE, ");
                sb.Append("STATUS )");
                sb.Append(" values ( ");
                sb.Append("@ID,");
                sb.Append("@GROUPNAME,");
                sb.Append("@GROUPDESCRIBE,");
                sb.Append(" @STATUS )");
                DbCommand cmd = new SqlCommand();
                cmd.CommandText = sb.ToString();
                cmd.CommandType = CommandType.Text;
                cmd.Parameters.Add(new SqlParameter("@ID", DbType.String)
                {
                    Value = tt.ID
                });
                cmd.Parameters.Add(new SqlParameter("@GROUPNAME", DbType.String)
                {
                    Value = tt.GROUPNAME
                });
                cmd.Parameters.Add(new SqlParameter("@GROUPDESCRIBE", DbType.String)
                {
                    Value = tt.GROUPDESCRIBE
                });
                cmd.Parameters.Add(new SqlParameter("@STATUS", DbType.String)
                {
                    Value = tt.STATUS
                });
                foreach (SqlParameter p in cmd.Parameters)
                {
                    p.IsNullable = true;
                    if (p.Value == null)
                    {
                        p.Value = DBNull.Value;
                    }
                }
                int val = DBHelper_SqlServer.ExecuteNonQuery(cmd);
                if (val > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch
            {
                return(false);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 废除上一次任务的有效性,当完成一个任务时,会先将以前的上一次任务(LastTask)作废,将刚刚完成的任务设置为最新上一次任务。
        /// </summary>
        /// <param name="DeviceID"></param>
        /// <returns></returns>
        public static bool SetLastTaskVoidByDeviceID(string DeviceID)
        {
            try
            {
                StringBuilder sb = new StringBuilder();
                sb.Append("update od_task set IsLastTask='N'  where DoDeviceID='" + DeviceID + "' and  IsLastTask='Y' and HadFinish='Y' ");
                DbCommand cmd = new SqlCommand();
                cmd.CommandText = sb.ToString();
                cmd.CommandType = CommandType.Text;
                //cmd.Parameters.Add(new OracleParameter("@DeviceID",OracleDbType.NVarchar2,100) { Value = DeviceID });
                DBHelper DBHelper_SqlServer = new DBLink();
                int      val = DBHelper_SqlServer.ExecuteNonQuery(cmd);

                if (val > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch
            {
                return(false);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// 根据ID号修改FLAG
        /// </summary>
        /// <param name="alarmId">报警序列号</param>
        /// <param name="flag">标记值</param>
        /// <returns></returns>
        public static bool UpdateOneFlagByAlarmId(string alarmId, string flag)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append(" update DEVICE_ALERT set ");
            sb.Append("SYSTEMFLAG=:SYSTEMFLAG ");
            sb.Append(" where ID=:ID ");
            DbCommand cmd = new SqlCommand();

            cmd.CommandText = sb.ToString();
            cmd.CommandType = CommandType.Text;
            cmd.Parameters.Add(new SqlParameter("SYSTEMFLAG", DbType.String)
            {
                Value = flag
            });
            cmd.Parameters.Add(new SqlParameter("ID", DbType.String)
            {
                Value = alarmId
            });
            DBHelper DBHelper_SqlServer = new DBLink();
            int      val = DBHelper_SqlServer.ExecuteNonQuery(cmd);

            if (val > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 4
0
        /// <summary>
        /// 按设备号删除设备
        /// </summary>
        /// <param name="DevictID"></param>
        /// <returns></returns>
        public static bool DeleteOne(string DevictID)
        {
            int      i                  = 0;
            string   strCMD             = "delete from DU_Device where DeviceID='" + DevictID + "'";
            DBHelper DBHelper_SqlServer = new DBLink();

            i = DBHelper_SqlServer.ExecuteNonQuery(strCMD);
            if (i > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 5
0
        /// <summary>
        /// 删除一个托盘
        /// </summary>
        /// <param name="ContainerID"></param>
        /// <returns></returns>
        public static bool DeleteOne(string ContainerID)
        {
            int      i                  = 0;
            string   strCMD             = "delete from IM_Container where ContainerID='" + ContainerID + "'";
            DBHelper DBHelper_SqlServer = new DBLink();

            i = DBHelper_SqlServer.ExecuteNonQuery(strCMD);
            if (i > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        public static bool DeleteOne(string ID)
        {
            int      i                  = 0;
            string   strCMD             = "delete from MODULE_VS_GROUP where ID='" + ID + "'";
            DBHelper DBHelper_SqlServer = new DBLink();

            i = DBHelper_SqlServer.ExecuteNonQuery(strCMD);
            if (i > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 7
0
        /// <summary>
        /// 删除一个物料
        /// </summary>
        /// <param name="SKU"></param>
        /// <returns></returns>
        public static bool DeleteOne(string SKU)
        {
            int      i                  = 0;
            string   strCMD             = "delete from IM_Item where SKU='" + SKU + "'";
            DBHelper DBHelper_SqlServer = new DBLink();

            i = DBHelper_SqlServer.ExecuteNonQuery(strCMD);
            if (i > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 8
0
 public static bool DeleteByCI_ID(string CI_ID)
 {
     try
     {
         StringBuilder sb = new StringBuilder();
         sb.Append("delete from iv_container_vs_item  ");
         sb.Append(" where CI_ID ='" + CI_ID + "' ");
         DBHelper DBHelper_SqlServer = new DBLink();
         int      val = DBHelper_SqlServer.ExecuteNonQuery(sb.ToString());
         if (val > 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch
     {
         return(false);
     }
 }
Esempio n. 9
0
        /// <summary>
        /// 删除一个托盘物料关联
        /// </summary>
        /// <param name="ContainerID"></param>
        /// <returns></returns>
        public static bool DeleteOneByContainerID(string ContainerID)
        {
            int    i      = 0;
            string strCMD = "delete from IV_container_vs_item where CONTAINERID='" + ContainerID + "'";

            try
            {
                DBHelper DBHelper_SqlServer = new DBLink();
                i = DBHelper_SqlServer.ExecuteNonQuery(strCMD);
                if (i > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                return(false);
            }
        }
Esempio n. 10
0
        public static bool UpdateHadTaskDoing(string placeID, string YorN)
        {
            try
            {
                StringBuilder sb = new StringBuilder();
                sb.Append(" update PL_place  set ");
                sb.Append(" HASTASKDOING=@HASTASKDOING ");
                sb.Append(" where PLACEID=@PLACEID ");
                DbCommand cmd = new SqlCommand();
                cmd.CommandText = sb.ToString();
                cmd.CommandType = CommandType.Text;
                cmd.Parameters.Add(new SqlParameter("@HASTASKDOING", DbType.String)
                {
                    Value = YorN
                });
                cmd.Parameters.Add(new SqlParameter("PLACEID", DbType.String)
                {
                    Value = placeID
                });
                DBHelper DBHelper_SqlServer = new DBLink();
                int      val = DBHelper_SqlServer.ExecuteNonQuery(cmd);

                if (val > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch
            {
                return(false);
            }
        }
Esempio n. 11
0
        /// <summary>
        /// 插入一条数据
        /// </summary>
        /// <param name="t_new"></param>
        /// <returns></returns>
        public static bool InsertNew(OD_Task t_new)
        {
            try
            {
                OD_Task       tt = t_new;
                StringBuilder sb = new StringBuilder();
                sb.Append(" Insert into OD_Task (  ");
                sb.Append("TASKID, ");
                sb.Append("TASKNAME, ");
                sb.Append("DODEVICEID, ");
                sb.Append("DODEVICENODEID, ");
                sb.Append("DODEVICETYPE, ");
                sb.Append("TASKTYPE, ");
                sb.Append("TASKLEVEL, ");
                sb.Append("TASKSTATUS, ");
                sb.Append("TASKCONTENTSTRING, ");
                sb.Append("TASKTYPEDESCRIPTION, ");
                sb.Append("CONTAINERNO, ");
                sb.Append("SOURCEPLACE, ");
                sb.Append("TOPLACE, ");
                sb.Append("ORDERDETAILSID, ");
                sb.Append("ORDERHEADID, ");
                sb.Append("SENDTIMES, ");
                sb.Append("RELEASESTATUS, ");
                sb.Append("HADFINISH, ");
                sb.Append("VOID, ");
                sb.Append("UPDATETIME, ");
                sb.Append("UPDATEUSER, ");
                sb.Append("WAREHOUSENO, ");
                sb.Append("ISCURRENTTASK, ");
                sb.Append("INPUTLOCATIONLEVEL, ");
                sb.Append("ISLASTTASK, ");
                sb.Append("ISEMPTYCONTAINER )");
                sb.Append(" values ( ");
                sb.Append("@TASKID,");
                sb.Append("@TASKNAME,");
                sb.Append("@DODEVICEID,");
                sb.Append("@DODEVICENODEID,");
                sb.Append("@DODEVICETYPE,");
                sb.Append("@TASKTYPE,");
                sb.Append("@TASKLEVEL,");
                sb.Append("@TASKSTATUS,");
                sb.Append("@TASKCONTENTSTRING,");
                sb.Append("@TASKTYPEDESCRIPTION,");
                sb.Append("@CONTAINERNO,");
                sb.Append("@SOURCEPLACE,");
                sb.Append("@TOPLACE,");
                sb.Append("@ORDERDETAILSID,");
                sb.Append("@ORDERHEADID,");
                sb.Append("@SENDTIMES,");
                sb.Append("@RELEASESTATUS,");
                sb.Append("@HADFINISH,");
                sb.Append("@VOID,");
                sb.Append("@UPDATETIME,");
                sb.Append("@UPDATEUSER,");
                sb.Append("@WAREHOUSENO,");
                sb.Append("@ISCURRENTTASK,");
                sb.Append("@INPUTLOCATIONLEVEL,");
                sb.Append("@ISLASTTASK,");
                sb.Append(" @ISEMPTYCONTAINER )");
                DbCommand cmd = new SqlCommand();
                cmd.CommandText = sb.ToString();
                cmd.CommandType = CommandType.Text;
                cmd.Parameters.Add(new SqlParameter("@TASKID", DbType.String)
                {
                    Value = tt.TASKID
                });
                cmd.Parameters.Add(new SqlParameter("@TASKNAME", DbType.String)
                {
                    Value = tt.TASKNAME
                });
                cmd.Parameters.Add(new SqlParameter("@DODEVICEID", DbType.String)
                {
                    Value = tt.DODEVICEID
                });
                cmd.Parameters.Add(new SqlParameter("@DODEVICENODEID", DbType.String)
                {
                    Value = tt.DODEVICENODEID
                });
                cmd.Parameters.Add(new SqlParameter("@DODEVICETYPE", DbType.String)
                {
                    Value = tt.DODEVICETYPE
                });
                cmd.Parameters.Add(new SqlParameter("@TASKTYPE", DbType.String)
                {
                    Value = tt.TASKTYPE
                });
                cmd.Parameters.Add(new SqlParameter("@TASKLEVEL", DbType.String)
                {
                    Value = tt.TASKLEVEL
                });
                cmd.Parameters.Add(new SqlParameter("@TASKSTATUS", DbType.String)
                {
                    Value = tt.TASKSTATUS
                });
                cmd.Parameters.Add(new SqlParameter("@TASKCONTENTSTRING", DbType.String)
                {
                    Value = tt.TASKCONTENTSTRING
                });
                cmd.Parameters.Add(new SqlParameter("@TASKTYPEDESCRIPTION", DbType.String)
                {
                    Value = tt.TASKTYPEDESCRIPTION
                });
                cmd.Parameters.Add(new SqlParameter("@CONTAINERNO", DbType.String)
                {
                    Value = tt.CONTAINERNO
                });
                cmd.Parameters.Add(new SqlParameter("@SOURCEPLACE", DbType.String)
                {
                    Value = tt.SOURCEPLACE
                });
                cmd.Parameters.Add(new SqlParameter("@TOPLACE", DbType.String)
                {
                    Value = tt.TOPLACE
                });
                cmd.Parameters.Add(new SqlParameter("@ORDERDETAILSID", DbType.String)
                {
                    Value = tt.ORDERDETAILSID
                });
                cmd.Parameters.Add(new SqlParameter("@ORDERHEADID", DbType.String)
                {
                    Value = tt.ORDERHEADID
                });
                cmd.Parameters.Add(new SqlParameter("@SENDTIMES", DbType.Int32)
                {
                    Value = tt.SENDTIMES
                });
                cmd.Parameters.Add(new SqlParameter("@RELEASESTATUS", DbType.String)
                {
                    Value = tt.RELEASESTATUS
                });
                cmd.Parameters.Add(new SqlParameter("@HADFINISH", DbType.String)
                {
                    Value = tt.HADFINISH
                });
                cmd.Parameters.Add(new SqlParameter("@VOID", DbType.Int32)
                {
                    Value = tt.VOID
                });
                cmd.Parameters.Add(new SqlParameter("@UPDATETIME", DbType.String)
                {
                    Value = tt.UPDATETIME
                });
                cmd.Parameters.Add(new SqlParameter("@UPDATEUSER", DbType.String)
                {
                    Value = tt.UPDATEUSER
                });
                cmd.Parameters.Add(new SqlParameter("@WAREHOUSENO", DbType.String)
                {
                    Value = tt.WAREHOUSENO
                });
                cmd.Parameters.Add(new SqlParameter("@ISCURRENTTASK", DbType.String)
                {
                    Value = tt.ISCURRENTTASK
                });
                cmd.Parameters.Add(new SqlParameter("@INPUTLOCATIONLEVEL", DbType.Int32)
                {
                    Value = tt.INPUTLOCATIONLEVEL
                });
                cmd.Parameters.Add(new SqlParameter("@ISLASTTASK", DbType.String)
                {
                    Value = tt.ISLASTTASK
                });
                cmd.Parameters.Add(new SqlParameter("@ISEMPTYCONTAINER", DbType.String)
                {
                    Value = tt.ISEMPTYCONTAINER
                });

                foreach (SqlParameter p in cmd.Parameters)
                {
                    p.IsNullable = true;
                    if (p.Value == null)
                    {
                        p.Value = DBNull.Value;
                    }
                }
                DBHelper DBHelper_SqlServer = new DBLink();
                int      val = DBHelper_SqlServer.ExecuteNonQuery(cmd);
                if (val > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch
            {
                return(false);
            }
        }
Esempio n. 12
0
 /// <summary>
 /// 更新某条数据
 /// </summary>
 /// <param name="t_new"></param>
 /// <returns></returns>
 public static bool UpdateOne(IV_place_vs_container t_new)
 {
     try
     {
         var           tt = t_new;
         StringBuilder sb = new StringBuilder();
         sb.Append(" update IV_place_vs_container set ");
         sb.Append("WAREHOUSENO=@WAREHOUSENO, ");
         sb.Append("PLACEID=@PLACEID, ");
         sb.Append("CONTAINERID=@CONTAINERID, ");
         sb.Append("UPDATETIME=@UPDATETIME, ");
         sb.Append("UPDATEUSER=@UPDATEUSER, ");
         sb.Append("VOID=@VOID, ");
         sb.Append("ISEMPTYCONTAINER=@ISEMPTYCONTAINER, ");
         sb.Append("ISEMPTYPLACE=@ISEMPTYPLACE, ");
         sb.Append("PVC_BACKUP1=@PVC_BACKUP1, ");
         sb.Append("PVC_BACKUP2=@PVC_BACKUP2, ");
         sb.Append("PVC_BACKUP3=@PVC_BACKUP3 ");
         sb.Append(" where ID=@ID ");
         DbCommand cmd = new SqlCommand();
         cmd.CommandText = sb.ToString();
         cmd.CommandType = CommandType.Text;
         cmd.Parameters.Add(new SqlParameter("@WAREHOUSENO", DbType.String)
         {
             Value = tt.WAREHOUSENO
         });
         cmd.Parameters.Add(new SqlParameter("@PLACEID", DbType.String)
         {
             Value = tt.PLACEID
         });
         cmd.Parameters.Add(new SqlParameter("@CONTAINERID", DbType.String)
         {
             Value = tt.CONTAINERID
         });
         cmd.Parameters.Add(new SqlParameter("@UPDATETIME", DbType.String)
         {
             Value = tt.UPDATETIME
         });
         cmd.Parameters.Add(new SqlParameter("@UPDATEUSER", DbType.String)
         {
             Value = tt.UPDATEUSER
         });
         cmd.Parameters.Add(new SqlParameter("@VOID", DbType.Int32)
         {
             Value = tt.VOID
         });
         cmd.Parameters.Add(new SqlParameter("@ISEMPTYCONTAINER", DbType.String)
         {
             Value = tt.ISEMPTYCONTAINER
         });
         cmd.Parameters.Add(new SqlParameter("@ISEMPTYPLACE", DbType.String)
         {
             Value = tt.ISEMPTYPLACE
         });
         cmd.Parameters.Add(new SqlParameter("@PVC_BACKUP1", DbType.String)
         {
             Value = tt.PVC_BACKUP1
         });
         cmd.Parameters.Add(new SqlParameter("@PVC_BACKUP2", DbType.String)
         {
             Value = tt.PVC_BACKUP2
         });
         cmd.Parameters.Add(new SqlParameter("@PVC_BACKUP3", DbType.String)
         {
             Value = tt.PVC_BACKUP3
         });
         cmd.Parameters.Add(new SqlParameter("@ID", DbType.String)
         {
             Value = tt.ID
         });
         foreach (SqlParameter p in cmd.Parameters)
         {
             p.IsNullable = true;
             if (p.Value == null)
             {
                 p.Value = DBNull.Value;
             }
         }
         DBHelper DBHelper_SqlServer = new DBLink();
         int      val = DBHelper_SqlServer.ExecuteNonQuery(cmd);
         if (val > 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
        public static bool UpdateOne(MODULE_VS_GROUP t_new)
        {
            try
            {
                MODULE_VS_GROUP tt = t_new;
                StringBuilder   sb = new StringBuilder();
                sb.Append(" update MODULE_VS_GROUP set ");
                sb.Append("GROUP_NAME=@GROUP_NAME, ");
                sb.Append("GROUP_DESC=@GROUP_DESC, ");
                sb.Append("MODULE_ID=@MODULE_ID, ");
                sb.Append("MODULE_NAME=@MODULE_NAME ");

                sb.Append(" where ID=@ID ");
                DbCommand cmd = new SqlCommand();
                cmd.CommandText = sb.ToString();
                cmd.CommandType = CommandType.Text;

                cmd.Parameters.Add(new SqlParameter("@GROUP_NAME", DbType.String)
                {
                    Value = tt.GROUP_NAME
                });
                cmd.Parameters.Add(new SqlParameter("@GROUP_DESC", DbType.String)
                {
                    Value = tt.GROUP_DESC
                });
                cmd.Parameters.Add(new SqlParameter("@MODULE_ID", DbType.String)
                {
                    Value = tt.MODULE_ID
                });
                cmd.Parameters.Add(new SqlParameter("@MODULE_NAME", DbType.String)
                {
                    Value = tt.MODULE_NAME
                });
                cmd.Parameters.Add(new SqlParameter("@ID", DbType.String)
                {
                    Value = tt.ID
                });
                foreach (SqlParameter p in cmd.Parameters)
                {
                    p.IsNullable = true;
                    if (p.Value == null)
                    {
                        p.Value = DBNull.Value;
                    }
                }
                DBHelper DBHelper_SqlServer = new DBLink();
                int      val = DBHelper_SqlServer.ExecuteNonQuery(cmd);
                if (val > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                return(false);
            }
        }
Esempio n. 14
0
        /// <summary>
        /// 新增一个托盘物料关联信息
        /// </summary>
        /// <param name="t_new"></param>
        /// <returns></returns>
        public static bool InsertNew(IV_container_vs_item t_new)
        {
            try
            {
                IV_container_vs_item tt = t_new;
                StringBuilder        sb = new StringBuilder();
                sb.Append(" Insert into IV_container_vs_item (  ");
                sb.Append("ID, ");
                sb.Append("CONTAINERID, ");
                sb.Append("ITEMSKU, ");
                sb.Append("ITEMDESC, ");
                sb.Append("ITEMBATCHNO, ");
                sb.Append("ITEMSTATUSNO, ");
                sb.Append("ITEMQTY, ");
                sb.Append("OCC_QTY, ");
                sb.Append("WITHORDER, ");
                sb.Append("UPDATETIME, ");
                sb.Append("UPDATEUSER, ");
                sb.Append("VOID, ");
                sb.Append("EXPIREDAY, ");
                sb.Append("CVI_BACKUP1, ");
                sb.Append("CVI_BACKUP2, ");
                sb.Append("CVI_BACKUP3 )");
                sb.Append(" values ( ");
                sb.Append("@ID,");
                sb.Append("@CONTAINERID,");
                sb.Append("@ITEMSKU,");
                sb.Append("@ITEMDESC,");
                sb.Append("@ITEMBATCHNO,");
                sb.Append("@ITEMSTATUSNO,");
                sb.Append("@ITEMQTY,");
                sb.Append("@OCC_QTY,");
                sb.Append("@WITHORDER,");
                sb.Append("@UPDATETIME,");
                sb.Append("@UPDATEUSER,");
                sb.Append("@VOID,");
                sb.Append("@EXPIREDAY,");
                sb.Append("@CVI_BACKUP1,");
                sb.Append("@CVI_BACKUP2,");
                sb.Append(" @CVI_BACKUP3 )");
                DbCommand cmd = new SqlCommand();
                cmd.CommandText = sb.ToString();
                cmd.CommandType = CommandType.Text;
                cmd.Parameters.Add(new SqlParameter("@ID", DbType.String)
                {
                    Value = tt.ID
                });
                cmd.Parameters.Add(new SqlParameter("@CONTAINERID", DbType.String)
                {
                    Value = tt.CONTAINERID
                });
                cmd.Parameters.Add(new SqlParameter("@ITEMSKU", DbType.String)
                {
                    Value = tt.ITEMSKU
                });
                cmd.Parameters.Add(new SqlParameter("@ITEMDESC", DbType.String)
                {
                    Value = tt.ITEMDESC
                });
                cmd.Parameters.Add(new SqlParameter("@ITEMBATCHNO", DbType.String)
                {
                    Value = tt.ITEMBATCHNO
                });
                cmd.Parameters.Add(new SqlParameter("@ITEMSTATUSNO", DbType.String)
                {
                    Value = tt.ITEMSTATUSNO
                });
                cmd.Parameters.Add(new SqlParameter("@ITEMQTY", DbType.Decimal)
                {
                    Value = tt.ITEMQTY
                });
                cmd.Parameters.Add(new SqlParameter("@OCC_QTY", DbType.Decimal)
                {
                    Value = tt.OCC_QTY
                });
                cmd.Parameters.Add(new SqlParameter("@WITHORDER", DbType.String)
                {
                    Value = tt.WITHORDER
                });
                cmd.Parameters.Add(new SqlParameter("@UPDATETIME", DbType.String)
                {
                    Value = tt.UPDATETIME
                });
                cmd.Parameters.Add(new SqlParameter("@UPDATEUSER", DbType.String)
                {
                    Value = tt.UPDATEUSER
                });
                cmd.Parameters.Add(new SqlParameter("@VOID", DbType.Int32)
                {
                    Value = tt.VOID
                });
                cmd.Parameters.Add(new SqlParameter("@EXPIREDAY", DbType.String)
                {
                    Value = tt.EXPIREDAY
                });
                cmd.Parameters.Add(new SqlParameter("@CVI_BACKUP1", DbType.String)
                {
                    Value = tt.CVI_BACKUP1
                });
                cmd.Parameters.Add(new SqlParameter("@CVI_BACKUP2", DbType.String)
                {
                    Value = tt.CVI_BACKUP2
                });
                cmd.Parameters.Add(new SqlParameter("@CVI_BACKUP3", DbType.String)
                {
                    Value = tt.CVI_BACKUP3
                });

                foreach (SqlParameter p in cmd.Parameters)
                {
                    p.IsNullable = true;
                    if (p.Value == null)
                    {
                        p.Value = DBNull.Value;
                    }
                }
                DBHelper DBHelper_SqlServer = new DBLink();
                int      val = DBHelper_SqlServer.ExecuteNonQuery(cmd);
                if (val > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch
            {
                return(false);
            }
        }
Esempio n. 15
0
        /// <summary>
        /// 插入一条数据
        /// </summary>
        /// <param name="t_new"></param>
        /// <returns></returns>
        public static bool InsertNew(DU_Device t_new)
        {
            try
            {
                DU_Device     tt = t_new;
                StringBuilder sb = new StringBuilder();
                sb.Append(" Insert into DU_Device (  ");
                sb.Append("DEVICEID, ");
                sb.Append("DEVICENODEID, ");
                sb.Append("DEVICESERVICEID, ");
                sb.Append("DEVICENAME, ");
                sb.Append("DEVICETYPE, ");
                sb.Append("VOID, ");
                sb.Append("WAREHOUSENO, ");
                sb.Append("AISLE, ");
                sb.Append("LINE, ");
                sb.Append("SERVERIPADDRESS, ");
                sb.Append("SERVERPORTNO, ");
                sb.Append("IPADDRESS, ");
                sb.Append("PORTNO, ");
                sb.Append("SOCKETTYPE, ");
                sb.Append("LOCALIPADDRESS, ");
                sb.Append("LOCALPORTNO, ");
                sb.Append("REMOTEIPADDRESS, ");
                sb.Append("REMOTEPORTNO, ");
                sb.Append("ISONLINE, ");
                sb.Append("WORKINGSTATUS )");
                sb.Append(" values ( ");
                sb.Append("@DEVICEID,");
                sb.Append("@DEVICENODEID,");
                sb.Append("@DEVICESERVICEID,");
                sb.Append("@DEVICENAME,");
                sb.Append("@DEVICETYPE,");
                sb.Append("@VOID,");
                sb.Append("@WAREHOUSENO,");
                sb.Append("@AISLE,");
                sb.Append("@LINE,");
                sb.Append("@SERVERIPADDRESS,");
                sb.Append("@SERVERPORTNO,");
                sb.Append("@IPADDRESS,");
                sb.Append("@PORTNO,");
                sb.Append("@SOCKETTYPE,");
                sb.Append("@LOCALIPADDRESS,");
                sb.Append("@LOCALPORTNO,");
                sb.Append("@REMOTEIPADDRESS,");
                sb.Append("@REMOTEPORTNO,");
                sb.Append("@ISONLINE,");
                sb.Append(" @WORKINGSTATUS )");
                DbCommand cmd = new SqlCommand();
                cmd.CommandText = sb.ToString();
                cmd.CommandType = CommandType.Text;
                cmd.Parameters.Add(new SqlParameter("@DEVICEID", DbType.String)
                {
                    Value = tt.DEVICEID
                });
                cmd.Parameters.Add(new SqlParameter("@DEVICENODEID", DbType.String)
                {
                    Value = tt.DEVICENODEID
                });
                cmd.Parameters.Add(new SqlParameter("@DEVICESERVICEID", DbType.String)
                {
                    Value = tt.DEVICESERVICEID
                });
                cmd.Parameters.Add(new SqlParameter("@DEVICENAME", DbType.String)
                {
                    Value = tt.DEVICENAME
                });
                cmd.Parameters.Add(new SqlParameter("@DEVICETYPE", DbType.String)
                {
                    Value = tt.DEVICETYPE
                });
                cmd.Parameters.Add(new SqlParameter("@VOID", DbType.Int32)
                {
                    Value = tt.VOID
                });
                cmd.Parameters.Add(new SqlParameter("@WAREHOUSENO", DbType.String)
                {
                    Value = tt.WAREHOUSENO
                });
                cmd.Parameters.Add(new SqlParameter("@AISLE", DbType.String)
                {
                    Value = tt.AISLE
                });
                cmd.Parameters.Add(new SqlParameter("@LINE", DbType.String)
                {
                    Value = tt.LINE
                });
                cmd.Parameters.Add(new SqlParameter("@SERVERIPADDRESS", DbType.String)
                {
                    Value = tt.SERVERIPADDRESS
                });
                cmd.Parameters.Add(new SqlParameter("@SERVERPORTNO", DbType.String)
                {
                    Value = tt.SERVERPORTNO
                });
                cmd.Parameters.Add(new SqlParameter("@IPADDRESS", DbType.String)
                {
                    Value = tt.IPADDRESS
                });
                cmd.Parameters.Add(new SqlParameter("@PORTNO", DbType.Int32)
                {
                    Value = tt.PORTNO
                });
                cmd.Parameters.Add(new SqlParameter("@SOCKETTYPE", DbType.String)
                {
                    Value = tt.SOCKETTYPE
                });
                cmd.Parameters.Add(new SqlParameter("@LOCALIPADDRESS", DbType.String)
                {
                    Value = tt.LOCALIPADDRESS
                });
                cmd.Parameters.Add(new SqlParameter("@LOCALPORTNO", DbType.Int32)
                {
                    Value = tt.LOCALPORTNO
                });
                cmd.Parameters.Add(new SqlParameter("@REMOTEIPADDRESS", DbType.String)
                {
                    Value = tt.REMOTEIPADDRESS
                });
                cmd.Parameters.Add(new SqlParameter("@REMOTEPORTNO", DbType.Int32)
                {
                    Value = tt.REMOTEPORTNO
                });
                cmd.Parameters.Add(new SqlParameter("@ISONLINE", DbType.Int32)
                {
                    Value = tt.ISONLINE
                });
                cmd.Parameters.Add(new SqlParameter("@WORKINGSTATUS", DbType.String)
                {
                    Value = tt.WORKINGSTATUS
                });

                foreach (DbParameter p in cmd.Parameters)
                {
                    p.IsNullable = true;
                    if (p.Value == null)
                    {
                        p.Value = DBNull.Value;
                    }
                }
                DBHelper DBHelper_SqlServer = new DBLink();
                int      val = DBHelper_SqlServer.ExecuteNonQuery(cmd);
                if (val > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch
            {
                return(false);
            }
        }
Esempio n. 16
0
        /// <summary>
        /// 更新某条数据
        /// </summary>
        /// <param name="t_new"></param>
        /// <returns></returns>
        public static bool UpdateOne(PL_Place t_new)
        {
            try
            {
                PL_Place      tt = t_new;
                StringBuilder sb = new StringBuilder();
                sb.Append(" update PL_PLACE set ");
                sb.Append("PLACENODEID=@PLACENODEID, ");
                sb.Append("PLACETYPE=@PLACETYPE, ");
                sb.Append("PLACEAREA=@PLACEAREA, ");
                sb.Append("ROWNO=@ROWNO, ");
                sb.Append("COLUMNNO=@COLUMNNO, ");
                sb.Append("LAYERNO=@LAYERNO, ");
                sb.Append("DEEPCELLNO=@DEEPCELLNO, ");
                sb.Append("AISLE=@AISLE, ");
                sb.Append("LINE=@LINE, ");
                sb.Append("AISLESIDE=@AISLESIDE, ");
                sb.Append("ISLOCK=@ISLOCK, ");
                sb.Append("ISFULL=@ISFULL, ");
                sb.Append("HASTASKDOING=@HASTASKDOING, ");
                sb.Append("WAREHOUSENO=@WAREHOUSENO, ");
                sb.Append("POSITIONNO_FOR_SRM=@POSITIONNO_FOR_SRM, ");
                sb.Append("X=@X, ");
                sb.Append("Y=@Y, ");
                sb.Append("Z=@Z, ");
                sb.Append("LENGTH=@LENGTH, ");
                sb.Append("WIDTH=@WIDTH, ");
                sb.Append("HEIGHT=@HEIGHT, ");
                sb.Append("MAXWEIGHT=@MAXWEIGHT, ");
                sb.Append("HEIGHTLEVEL=@HEIGHTLEVEL, ");
                sb.Append("PRIORITY=@PRIORITY, ");
                sb.Append("AREA_LOGIC=@AREA_LOGIC ");

                sb.Append(" where PLACEID=@PLACEID ");
                DbCommand cmd = new SqlCommand();
                cmd.CommandText = sb.ToString();
                cmd.CommandType = CommandType.Text;

                cmd.Parameters.Add(new SqlParameter("@PLACENODEID", DbType.String)
                {
                    Value = tt.PLACENODEID
                });
                cmd.Parameters.Add(new SqlParameter("@PLACETYPE", DbType.String)
                {
                    Value = tt.PLACETYPE
                });
                cmd.Parameters.Add(new SqlParameter("@PLACEAREA", DbType.String)
                {
                    Value = tt.PLACEAREA
                });
                cmd.Parameters.Add(new SqlParameter("@ROWNO", DbType.String)
                {
                    Value = tt.ROWNO
                });
                cmd.Parameters.Add(new SqlParameter("@COLUMNNO", DbType.String)
                {
                    Value = tt.COLUMNNO
                });
                cmd.Parameters.Add(new SqlParameter("@LAYERNO", DbType.String)
                {
                    Value = tt.LAYERNO
                });
                cmd.Parameters.Add(new SqlParameter("@DEEPCELLNO", DbType.String)
                {
                    Value = tt.DEEPCELLNO
                });
                cmd.Parameters.Add(new SqlParameter("@AISLE", DbType.String)
                {
                    Value = tt.AISLE
                });
                cmd.Parameters.Add(new SqlParameter("@LINE", DbType.String)
                {
                    Value = tt.LINE
                });
                cmd.Parameters.Add(new SqlParameter("@AISLESIDE", DbType.String)
                {
                    Value = tt.AISLESIDE
                });
                cmd.Parameters.Add(new SqlParameter("@ISLOCK", DbType.String)
                {
                    Value = tt.ISLOCK
                });
                cmd.Parameters.Add(new SqlParameter("@ISFULL", DbType.String)
                {
                    Value = tt.ISFULL
                });
                cmd.Parameters.Add(new SqlParameter("@HASTASKDOING", DbType.String)
                {
                    Value = tt.HASTASKDOING
                });
                cmd.Parameters.Add(new SqlParameter("@WAREHOUSENO", DbType.String)
                {
                    Value = tt.WAREHOUSENO
                });
                cmd.Parameters.Add(new SqlParameter("@POSITIONNO_FOR_SRM", DbType.String)
                {
                    Value = tt.POSITIONNO_FOR_SRM
                });
                cmd.Parameters.Add(new SqlParameter("@X", DbType.String)
                {
                    Value = tt.X
                });
                cmd.Parameters.Add(new SqlParameter("@Y", DbType.String)
                {
                    Value = tt.Y
                });
                cmd.Parameters.Add(new SqlParameter("@Z", DbType.String)
                {
                    Value = tt.Z
                });
                cmd.Parameters.Add(new SqlParameter("@LENGTH", DbType.Decimal)
                {
                    Value = tt.LENGTH
                });
                cmd.Parameters.Add(new SqlParameter("@WIDTH", DbType.Decimal)
                {
                    Value = tt.WIDTH
                });
                cmd.Parameters.Add(new SqlParameter("@HEIGHT", DbType.Decimal)
                {
                    Value = tt.HEIGHT
                });
                cmd.Parameters.Add(new SqlParameter("@MAXWEIGHT", DbType.Decimal)
                {
                    Value = tt.MAXWEIGHT
                });
                cmd.Parameters.Add(new SqlParameter("@HEIGHTLEVEL", DbType.String)
                {
                    Value = tt.HEIGHTLEVEL
                });
                cmd.Parameters.Add(new SqlParameter("@PRIORITY", DbType.Int32)
                {
                    Value = tt.PRIORITY
                });
                cmd.Parameters.Add(new SqlParameter("@AREA_LOGIC", DbType.String)
                {
                    Value = tt.AREA_LOGIC
                });
                cmd.Parameters.Add(new SqlParameter("@PLACEID", DbType.String)
                {
                    Value = tt.PLACEID
                });
                foreach (SqlParameter p in cmd.Parameters)
                {
                    p.IsNullable = true;
                    if (p.Value == null)
                    {
                        p.Value = DBNull.Value;
                    }
                }
                DBHelper DBHelper_SqlServer = new DBLink();
                int      val = DBHelper_SqlServer.ExecuteNonQuery(cmd);
                if (val > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                return(false);
            }
        }
Esempio n. 17
0
        /// <summary>
        /// 更新一个物料信息
        /// </summary>
        /// <param name="t_new"></param>
        /// <returns></returns>
        public static bool UpdateOne(IM_Item t_new)
        {
            IM_Item       tt = t_new;
            StringBuilder sb = new StringBuilder();

            sb.Append(" update IM_Item set ");
            sb.Append("SKUDESC=@SKUDESC, ");
            sb.Append("BARCODE=@BARCODE, ");
            sb.Append("EANCODE=@EANCODE, ");
            sb.Append("COMPATIBLECODE=@COMPATIBLECODE, ");
            sb.Append("SPEC=@SPEC, ");
            sb.Append("ITEMCLASS=@ITEMCLASS, ");
            sb.Append("ABCCLASS=@ABCCLASS, ");
            sb.Append("UOM=@UOM, ");
            sb.Append("LENGTH=@LENGTH, ");
            sb.Append("WIDTH=@WIDTH, ");
            sb.Append("HEIGHT=@HEIGHT, ");
            sb.Append("WEIGHT=@WEIGHT, ");
            sb.Append("SAVEQTY=@SAVEQTY, ");
            sb.Append("STORGELIFE=@STORGELIFE, ");
            sb.Append("VOID=@VOID, ");
            sb.Append("UPDATETIME=@UPDATETIME, ");
            sb.Append("UPDATEUSER=@UPDATEUSER, ");
            sb.Append("ITEM_BK1=@ITEM_BK1, ");
            sb.Append("ITEM_BK2=@ITEM_BK2, ");
            sb.Append("ITEM_BK3=@ITEM_BK3 ");

            sb.Append(" where SKU=@SKU ");
            DbCommand cmd = new SqlCommand();

            cmd.CommandText = sb.ToString();
            cmd.CommandType = CommandType.Text;

            cmd.Parameters.Add(new SqlParameter("@SKUDESC", DbType.String)
            {
                Value = tt.SKUDESC
            });
            cmd.Parameters.Add(new SqlParameter("@BARCODE", DbType.String)
            {
                Value = tt.BARCODE
            });
            cmd.Parameters.Add(new SqlParameter("@EANCODE", DbType.String)
            {
                Value = tt.EANCODE
            });
            cmd.Parameters.Add(new SqlParameter("@COMPATIBLECODE", DbType.String)
            {
                Value = tt.COMPATIBLECODE
            });
            cmd.Parameters.Add(new SqlParameter("@SPEC", DbType.String)
            {
                Value = tt.SPEC
            });
            cmd.Parameters.Add(new SqlParameter("@ITEMCLASS", DbType.String)
            {
                Value = tt.ITEMCLASS
            });
            cmd.Parameters.Add(new SqlParameter("@ABCCLASS", DbType.String)
            {
                Value = tt.ABCCLASS
            });
            cmd.Parameters.Add(new SqlParameter("@UOM", DbType.String)
            {
                Value = tt.UOM
            });
            cmd.Parameters.Add(new SqlParameter("@LENGTH", DbType.Decimal)
            {
                Value = tt.LENGTH
            });
            cmd.Parameters.Add(new SqlParameter("@WIDTH", DbType.Decimal)
            {
                Value = tt.WIDTH
            });
            cmd.Parameters.Add(new SqlParameter("@HEIGHT", DbType.Decimal)
            {
                Value = tt.HEIGHT
            });
            cmd.Parameters.Add(new SqlParameter("@WEIGHT", DbType.Decimal)
            {
                Value = tt.WEIGHT
            });
            cmd.Parameters.Add(new SqlParameter("@SAVEQTY", DbType.Decimal)
            {
                Value = tt.SAVEQTY
            });
            cmd.Parameters.Add(new SqlParameter("@STORGELIFE", DbType.String)
            {
                Value = tt.STORGELIFE
            });
            cmd.Parameters.Add(new SqlParameter("@VOID", DbType.Int32)
            {
                Value = tt.VOID
            });
            cmd.Parameters.Add(new SqlParameter("@UPDATETIME", DbType.String)
            {
                Value = tt.UPDATETIME
            });
            cmd.Parameters.Add(new SqlParameter("@UPDATEUSER", DbType.String)
            {
                Value = tt.UPDATEUSER
            });
            cmd.Parameters.Add(new SqlParameter("@ITEM_BK1", DbType.String)
            {
                Value = tt.ITEM_BK1
            });
            cmd.Parameters.Add(new SqlParameter("@ITEM_BK2", DbType.String)
            {
                Value = tt.ITEM_BK2
            });
            cmd.Parameters.Add(new SqlParameter("@ITEM_BK3", DbType.String)
            {
                Value = tt.ITEM_BK3
            });
            cmd.Parameters.Add(new SqlParameter("@SKU", DbType.String)
            {
                Value = tt.SKU
            });
            foreach (SqlParameter p in cmd.Parameters)
            {
                p.IsNullable = true;
                if (p.Value == null)
                {
                    p.Value = DBNull.Value;
                }
            }
            DBHelper DBHelper_SqlServer = new DBLink();
            int      val = DBHelper_SqlServer.ExecuteNonQuery(cmd);

            if (val > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 18
0
        /// <summary>
        /// 新增一个托盘信息
        /// </summary>
        /// <param name="t_new"></param>
        /// <returns></returns>
        public static bool InsertNew(IM_Container t_new)
        {
            try
            {
                IM_Container  tt = t_new;
                StringBuilder sb = new StringBuilder();
                sb.Append(" Insert into IM_Container (  ");
                sb.Append("CONTAINERID, ");
                sb.Append("CONTAINERDESC, ");
                sb.Append("CONTAINERTYPE, ");
                sb.Append("LENGTH, ");
                sb.Append("WIDTH, ");
                sb.Append("HEIGHT, ");
                sb.Append("MAXWEIGHT, ");
                sb.Append("VOID, ");
                sb.Append("STATUS, ");
                sb.Append("WAREHOUSENO, ");
                sb.Append("ONLINEMODEL, ");
                sb.Append("UPDATETIME, ");
                sb.Append("UPDATEUSER )");
                sb.Append(" values ( ");
                sb.Append("@CONTAINERID,");
                sb.Append("@CONTAINERDESC,");
                sb.Append("@CONTAINERTYPE,");
                sb.Append("@LENGTH,");
                sb.Append("@WIDTH,");
                sb.Append("@HEIGHT,");
                sb.Append("@MAXWEIGHT,");
                sb.Append("@VOID,");
                sb.Append("@STATUS,");
                sb.Append("@WAREHOUSENO,");
                sb.Append("@ONLINEMODEL,");
                sb.Append("@UPDATETIME,");
                sb.Append(" @UPDATEUSER )");
                DbCommand cmd = new SqlCommand();
                cmd.CommandText = sb.ToString();
                cmd.CommandType = CommandType.Text;
                cmd.Parameters.Add(new SqlParameter("@CONTAINERID", DbType.String)
                {
                    Value = tt.CONTAINERID
                });
                cmd.Parameters.Add(new SqlParameter("@CONTAINERDESC", DbType.String)
                {
                    Value = tt.CONTAINERDESC
                });
                cmd.Parameters.Add(new SqlParameter("@CONTAINERTYPE", DbType.String)
                {
                    Value = tt.CONTAINERTYPE
                });
                cmd.Parameters.Add(new SqlParameter("@LENGTH", DbType.Decimal)
                {
                    Value = tt.LENGTH
                });
                cmd.Parameters.Add(new SqlParameter("@WIDTH", DbType.Decimal)
                {
                    Value = tt.WIDTH
                });
                cmd.Parameters.Add(new SqlParameter("@HEIGHT", DbType.Decimal)
                {
                    Value = tt.HEIGHT
                });
                cmd.Parameters.Add(new SqlParameter("@MAXWEIGHT", DbType.Decimal)
                {
                    Value = tt.MAXWEIGHT
                });
                cmd.Parameters.Add(new SqlParameter("@VOID", DbType.Int32)
                {
                    Value = tt.VOID
                });
                cmd.Parameters.Add(new SqlParameter("@STATUS", DbType.Int32)
                {
                    Value = tt.STATUS
                });
                cmd.Parameters.Add(new SqlParameter("@WAREHOUSENO", DbType.String)
                {
                    Value = tt.WAREHOUSENO
                });
                cmd.Parameters.Add(new SqlParameter("@ONLINEMODEL", DbType.String)
                {
                    Value = tt.ONLINEMODEL
                });
                cmd.Parameters.Add(new SqlParameter("@UPDATETIME", DbType.String)
                {
                    Value = tt.UPDATETIME
                });
                cmd.Parameters.Add(new SqlParameter("@UPDATEUSER", DbType.String)
                {
                    Value = tt.UPDATEUSER
                });

                foreach (SqlParameter p in cmd.Parameters)
                {
                    p.IsNullable = true;
                    if (p.Value == null)
                    {
                        p.Value = DBNull.Value;
                    }
                }
                DBHelper DBHelper_SqlServer = new DBLink();
                int      val = DBHelper_SqlServer.ExecuteNonQuery(cmd);
                if (val > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch
            {
                return(false);
            }
        }
Esempio n. 19
0
        /// <summary>
        /// 更新某条数据
        /// </summary>
        /// <param name="t_new"></param>
        /// <returns></returns>
        public static bool UpdateOne(Device_Alert t_new)
        {
            try
            {
                Device_Alert  tt = t_new;
                StringBuilder sb = new StringBuilder();
                sb.Append(" update DEVICE_ALERT set ");
                sb.Append("DEVICEID=@DEVICEID, ");
                sb.Append("ALERTID=@ALERTID, ");
                sb.Append("ALERTNAME=@ALERTNAME, ");
                sb.Append("CREATETIME=@CREATETIME, ");
                sb.Append("FINISH_TIME=@FINISH_TIME, ");
                sb.Append("TIME_OF_DURATION=@TIME_OF_DURATION, ");
                sb.Append("SYSTEMFLAG=@SYSTEMFLAG ");
                sb.Append(" where ID=@ID ");
                DbCommand cmd = new SqlCommand();
                cmd.CommandText = sb.ToString();
                cmd.CommandType = CommandType.Text;

                cmd.Parameters.Add(new SqlParameter("@DEVICEID", DbType.String)
                {
                    Value = tt.DEVICEID
                });
                cmd.Parameters.Add(new SqlParameter("@ALERTID", DbType.String)
                {
                    Value = tt.ALERTID
                });
                cmd.Parameters.Add(new SqlParameter("@ALERTNAME", DbType.String)
                {
                    Value = tt.ALERTNAME
                });
                cmd.Parameters.Add(new SqlParameter("@CREATETIME", DbType.String)
                {
                    Value = tt.CREATETIME
                });
                cmd.Parameters.Add(new SqlParameter("@FINISH_TIME", DbType.String)
                {
                    Value = tt.FINISH_TIME
                });
                cmd.Parameters.Add(new SqlParameter("@TIME_OF_DURATION", DbType.String)
                {
                    Value = tt.TIME_OF_DURATION
                });
                cmd.Parameters.Add(new SqlParameter("@SYSTEMFLAG", DbType.String)
                {
                    Value = tt.SYSTEMFLAG
                });
                cmd.Parameters.Add(new SqlParameter("@ID", DbType.String)
                {
                    Value = tt.ID
                });
                foreach (DbParameter p in cmd.Parameters)
                {
                    p.IsNullable = true;
                    if (p.Value == null)
                    {
                        p.Value = DBNull.Value;
                    }
                }
                DBHelper DBHelper_SqlServer = new DBLink();
                int      val = DBHelper_SqlServer.ExecuteNonQuery(cmd);
                if (val > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                return(false);
            }
        }