/// <summary>
 /// 添加运单号
 /// </summary>
 /// <param name="number">运单号</param>
 public static DateTime AddhuadongTmsOrder(string number, string storageName, string destina, int consignorId, ref string sqlStr)
 {
     try
     {
         DateTime dtNow = DateTime.Now;
         //string sql =string.Format( "insert into huadong_tms_order(relationId) values('{0}') ;",number);
         //_SqlHelp.ExecuteNonQuery(sql, System.Data.CommandType.Text);
         int storageId = 0;
         List <ColdStorage> storage = StorageServer.GetStorageList(storageName);
         if (storage.Count() > 0)
         {
             storageId = storage[0].Id;
         }
         string        nowTime = dtNow.ToString("yyyy-MM-dd HH:mm:ss");
         StringBuilder sql     = new StringBuilder("insert into huadong_tms_order(relationId,operateAt,ConsignorId) ");
         sql.AppendLine("values('{0}','{1}','{6}') ;");
         sql.AppendLine("insert into c2lp_node (orderNumber,operateAt,storageId,storageName,content,arrived,ConsignorId,parentStorageId) values('{0}','{1}','{2}','{3}','{4}','{5}','{6}',0);");
         string content = string.Format("【{0}】 配送员{1}已收取快件 准备运往【{2}】{3}", storageName, (string.IsNullOrEmpty(storage[0].driver) ? "" : "【" + storage[0].driver + "】"), destina, (string.IsNullOrEmpty(storage[0].driverTel) ? "" : " 联系电话【" + storage[0].driverTel + "】"));
         sqlStr = string.Format(sql.ToString(), number, nowTime, storageId, storageName, content, 1, consignorId);
         _SqlHelp.ExecuteNonQuery(sqlStr, System.Data.CommandType.Text);
         return(dtNow);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #2
0
        /// <summary>
        /// 创建运单
        /// </summary>
        /// <param name="number">运单号</param>
        /// <param name="sId">发货客户ID</param>
        /// <param name="sOrg">发货客户名称</param>
        /// <param name="sPerson">发货人姓名</param>
        /// <param name="sTel">发货人电话</param>
        /// <param name="sAddress">发货人地址</param>
        /// <param name="rId">收货客户ID,没有时写NULL</param>
        /// <param name="rOrg">收货客户名称</param>
        /// <param name="rPerson">收货人姓名</param>
        /// <param name="rTel">收货电话</param>
        /// <param name="rAddress">收货地址</param>
        /// <param name="bCount">计费数量</param>
        public static DateTime AddOrder(string number, int sId, string sOrg, string sPerson, string sTel, string sAddress,
                                        string rId, string rOrg, string rPerson, string rTel, string rAddress, int bCount, string storageName, string destina, ref string sqlStr)
        {
            DateTime dtNow = DateTime.Now;

            try
            {
                int storageId = 0;
                List <ColdStorage> storage = StorageServer.GetStorageList(storageName);
                if (storage.Count() > 0)
                {
                    storageId = storage[0].Id;
                }
                string        nowTime = dtNow.ToString("yyyy-MM-dd HH:mm:ss");
                StringBuilder sql     = new StringBuilder("insert into c2lp_order (number,senderId,senderOrg,senderPerson,senderTel,senderAddress,receiverId,receiverOrg,receiverPerson,receiverTel,receiverAddress,billingCount,stage,beginAt)");
                sql.AppendLine("values('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','{10}','{11}','{12}','{13}');");
                sql.AppendLine("insert into c2lp_node (orderNumber,operateAt,storageId,storageName,content,arrived,ConsignorId,parentStorageId) values('{0}','{13}','{14}','{17}','{15}','{16}',0,0);");
                string content = string.Format("【{0}】 配送员{1}已收取快件 准备运往【{2}】{3}", storageName, (string.IsNullOrEmpty(storage[0].driver) ? "" : "【" + storage[0].driver + "】"), destina, (string.IsNullOrEmpty(storage[0].driverTel) ? "" : " 联系电话【" + storage[0].driverTel + "】"));
                sqlStr = string.Format(sql.ToString(), number, sId, sOrg, sPerson, sTel, sAddress, rId, rOrg, rPerson, rTel, rAddress, bCount, 0, nowTime, storageId, content, 1, storageName);
                _SqlHelp.ExecuteNonQuery(sqlStr, System.Data.CommandType.Text);
                return(dtNow);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #3
0
 /// <summary>
 /// 创建运单
 /// </summary>
 /// <param name="number">运单号</param>
 /// <param name="sId">发货客户ID</param>
 /// <param name="sOrg">发货客户名称</param>
 /// <param name="sPerson">发货人姓名</param>
 /// <param name="sTel">发货人电话</param>
 /// <param name="sAddress">发货人地址</param>
 /// <param name="rId">收货客户ID,没有时写NULL</param>
 /// <param name="rOrg">收货客户名称</param>
 /// <param name="rPerson">收货人姓名</param>
 /// <param name="rTel">收货电话</param>
 /// <param name="rAddress">收货地址</param>
 /// <param name="bCount">计费数量</param>
 public static void AddOrder(string number, int sId, string sOrg, string sPerson, string sTel, string sAddress,
                             string rId, string rOrg, string rPerson, string rTel, string rAddress, int bCount, string storageName)
 {
     try
     {
         int storageId = 0;
         List <ColdStorage> storage = StorageServer.GetStorageList(storageName);
         if (storage.Count() > 0)
         {
             storageId = storage[0].Id;
         }
         string        nowTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
         StringBuilder sql     = new StringBuilder("insert into c2lp_order (number,senderId,senderOrg,senderPerson,senderTel,senderAddress,receiverId,receiverOrg,receiverPerson,receiverTel,receiverAddress,billingCount,stage,beginAt)");
         sql.AppendLine("values('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','{10}','{11}','{12}','{13}');");
         sql.AppendLine("insert into c2lp_node (orderNumber,operateAt,storageId,storageName,content,arrived) values('{0}','{13}','{14}','{17}','{15}','{16}');");
         string sqlStr = string.Format(sql.ToString(), number, sId, sOrg, sPerson, sTel, sAddress, rId, rOrg, rPerson, rTel, rAddress, bCount, 0, nowTime, storageId, "已收取快件", 1, storageName);
         _SqlHelp.ExecuteNonQuery(sqlStr, System.Data.CommandType.Text);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #4
0
 /// <summary>
 /// 添加运单号
 /// </summary>
 /// <param name="number">运单号</param>
 public static void AddhuadongTmsOrder(string number, string storageName)
 {
     try
     {
         //string sql =string.Format( "insert into huadong_tms_order(relationId) values('{0}') ;",number);
         //_SqlHelp.ExecuteNonQuery(sql, System.Data.CommandType.Text);
         int storageId = 0;
         List <ColdStorage> storage = StorageServer.GetStorageList(storageName);
         if (storage.Count() > 0)
         {
             storageId = storage[0].Id;
         }
         string        nowTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
         StringBuilder sql     = new StringBuilder("insert into huadong_tms_order(relationId) ");
         sql.AppendLine("values('{0}') ;");
         sql.AppendLine("insert into c2lp_node (orderNumber,operateAt,storageId,storageName,content,arrived) values('{0}','{1}','{2}','{3}','{4}','{5}');");
         string sqlStr = string.Format(sql.ToString(), number, nowTime, storageId, storageName, "已收取快件", 1);
         _SqlHelp.ExecuteNonQuery(sqlStr, System.Data.CommandType.Text);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }