Beispiel #1
0
        public bool InsertItemIfno(ItemVo item)
        {
            using (SqlCommand cmd = new SqlCommand())
            {
                cmd.Connection  = new SqlConnection(ConnectionString);
                cmd.CommandText = "InsertItemInfo";
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Connection.Open();
                cmd.Parameters.AddWithValue("@Item_Code", item.Item_Code);
                cmd.Parameters.AddWithValue("@Item_Name", item.Item_Name);
                cmd.Parameters.AddWithValue("@Item_Name_Eng", item.Item_Name_Eng);
                cmd.Parameters.AddWithValue("@Item_Name_Eng_Alias", item.Item_Name_Eng_Alias);
                cmd.Parameters.AddWithValue("@Item_Type", item.Item_Type);
                cmd.Parameters.AddWithValue("@Item_Spec", item.Item_Spec);
                cmd.Parameters.AddWithValue("@Item_Unit", item.Item_Unit);

                // cmd.Parameters.AddWithValue("@Item_Stock", item.Item_Stock);
                cmd.Parameters.AddWithValue("@RollingUPH", item.RollingUPH);
                cmd.Parameters.AddWithValue("@SteelUPH", item.SteelUPH);
                cmd.Parameters.AddWithValue("@IronUPH", item.IronUPH);
                cmd.Parameters.AddWithValue("@PackageUPH", item.PackageUPH);
                cmd.Parameters.AddWithValue("@Remark", item.Remark);
                int Checked = cmd.ExecuteNonQuery();
                cmd.Connection.Close();
                if (Checked == 0)
                {
                    return(false);
                }
                return(true);
            }
        }
Beispiel #2
0
        public bool InsertItemInfo(ItemVo vo)
        {
            ItemDAC dac = new ItemDAC();

            return(dac.InsertItemIfno(vo));
        }