public int AddOutStorage([FromForm] tb_OutStorage model)
        {
            string osNo = DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString() + DateTime.Now.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString();

            model.OStorageNo = "CK" + osNo;
            model.DBMan      = "李四";
            model.OutState   = 2;
            return(_oStorageManage.AddOutStorage(model));
        }
Beispiel #2
0
        public int AddOutStorage(tb_OutStorage model)
        {
            string procName = "proc_AddOutStorage";

            SqlParameter[] sqlParameters = new SqlParameter[] {
                new SqlParameter {
                    ParameterName = "@OutTime", DbType = DbType.Date, Direction = ParameterDirection.Input, Value = model.OutTime
                },
                new SqlParameter {
                    ParameterName = "@OrderNo", DbType = DbType.String, Direction = ParameterDirection.Input, Value = model.OrderNo
                },
                new SqlParameter {
                    ParameterName = "@OStorageNo", DbType = DbType.String, Direction = ParameterDirection.Input, Value = model.OStorageNo
                },
                new SqlParameter {
                    ParameterName = "@DispatchingId", DbType = DbType.String, Direction = ParameterDirection.Input, Value = model.DispatchingId
                },
                new SqlParameter {
                    ParameterName = "@Consignee", DbType = DbType.String, Direction = ParameterDirection.Input, Value = model.Consignee
                },
                new SqlParameter {
                    ParameterName = "@CPhoneNum", DbType = DbType.String, Direction = ParameterDirection.Input, Value = model.CPhoneNum
                },
                new SqlParameter {
                    ParameterName = "@DispatchingArea", DbType = DbType.String, Direction = ParameterDirection.Input, Value = model.DispatchingArea
                },
                new SqlParameter {
                    ParameterName = "@OutStorageId", DbType = DbType.String, Direction = ParameterDirection.Input, Value = model.OutStorageId
                },
                new SqlParameter {
                    ParameterName = "@DBMan", DbType = DbType.String, Direction = ParameterDirection.Input, Value = model.DBMan
                },
                new SqlParameter {
                    ParameterName = "@OutState", DbType = DbType.Int32, Direction = ParameterDirection.Input, Value = model.OutState
                },
            };
            return(_helper.ExecuteNonQueryProc(procName, sqlParameters));
        }