示例#1
0
        public string CreateOrderSubmitDAL(ConsigneeSearchCondition consignee)
        {
            string result = string.Empty;

            using (SqlConnection conn = new SqlConnection(connStr))
            {
                try
                {
                    SqlCommand cmd = new SqlCommand("pro_wms_CreateOrderConsignee", conn);
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@UserName", consignee.UserName);
                    cmd.Parameters[0].SqlDbType = SqlDbType.NVarChar;
                    cmd.Parameters[0].Size      = 50;

                    cmd.Parameters.AddWithValue("@UserPhone", consignee.UserPhone);
                    cmd.Parameters[1].SqlDbType = SqlDbType.NVarChar;
                    cmd.Parameters[1].Size      = 100;

                    cmd.Parameters.AddWithValue("@UserAddress", consignee.UserAddress);
                    cmd.Parameters[2].SqlDbType = SqlDbType.NVarChar;
                    cmd.Parameters[2].Size      = 100;

                    cmd.Parameters.AddWithValue("@UserEmail", consignee.UserEmail);
                    cmd.Parameters[3].SqlDbType = SqlDbType.NVarChar;
                    cmd.Parameters[3].Size      = 100;

                    cmd.Parameters.AddWithValue("@DeliveryDate", consignee.DeliveryDate);
                    cmd.Parameters[4].SqlDbType = SqlDbType.NVarChar;
                    cmd.Parameters[4].Size      = 50;

                    cmd.Parameters.AddWithValue("@ReturnDate", consignee.ReturnDate);
                    cmd.Parameters[5].SqlDbType = SqlDbType.NVarChar;
                    cmd.Parameters[5].Size      = 50;

                    cmd.Parameters.AddWithValue("@Result", "");
                    cmd.Parameters[6].Direction = ParameterDirection.Output;
                    cmd.Parameters[6].SqlDbType = SqlDbType.VarChar;
                    cmd.Parameters[6].Size      = 8000;

                    conn.Open();
                    cmd.CommandTimeout = 180;
                    cmd.ExecuteNonQuery();
                    result = cmd.Parameters[6].Value.ToString();
                    conn.Close();
                }
                catch (Exception)
                {
                    throw;
                }
            }

            return(result);
        }
示例#2
0
 public string CreateOrderSubmitBLL(ConsigneeSearchCondition consignee)
 {
     return(accessor.CreateOrderSubmitDAL(consignee));
 }