public void Create(ProductWarehouseLogDetailModel model)
        {
            string sql = string.Format(@"
 insert into ProductWarehouseLogDetail (WarehouseNumber,DocumentNumber,ProductNumber,Version,
RowNumber,OrdersNumber,Qty,InventoryQty,Remark,CustomerProductNumber)
values('{0}','','{1}','{2}','','',{3},0,'{4}','{5}')
", model.WarehouseNumber, model.ProductNumber, model.Version, model.Qty, model.Remark, model.CustomerProductNumber);

            SqlHelper.ExecuteSql(sql);
        }
        public ProductWarehouseLogDetailModel Get(string guid)
        {
            ProductWarehouseLogDetailModel model = new ProductWarehouseLogDetailModel();
            string    sql = string.Format(@"select top 1 * from  ProductWarehouseLogDetail where guid='{0}'", guid);
            DataTable dt  = SqlHelper.GetTable(sql);

            if (dt != null && dt.Rows.Count > 0)
            {
                DataRow dr = dt.Rows[0];
                model.Guid                  = guid;
                model.WarehouseNumber       = dr["WarehouseNumber"] == null ? string.Empty : dr["WarehouseNumber"].ToString();
                model.ProductNumber         = dr["ProductNumber"] == null ? string.Empty : dr["ProductNumber"].ToString();
                model.Version               = dr["Version"] == null ? string.Empty : dr["Version"].ToString();
                model.CustomerProductNumber = dr["CustomerProductNumber"] == null ? string.Empty : dr["CustomerProductNumber"].ToString();
                model.Remark                = dr["Remark"] == null ? string.Empty : dr["Remark"].ToString();
                model.Qty = dr["Qty"] == null ? 0 : Convert.ToInt32(dr["Qty"].ToString());
            }
            return(model);
        }