예제 #1
0
        public string Brand_Update(Brand_Class obj)
        {
            if (obj.Active1 == "True")
            {
                obj.Active1 = "1";
            }
            else
            {
                obj.Active1 = "0";
            }
            SqlConnection con = new SqlConnection(objCon.ConnectionReturn());
            SqlCommand    cmd = new SqlCommand("Brand_Update", con);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@BrandId", obj.BrandId);
            cmd.Parameters.AddWithValue("@BrandName", obj.Name);
            cmd.Parameters.Add("@MetaDescription", SqlDbType.VarChar).Value = obj.MetaDescription1;
            cmd.Parameters.Add("@SearchKeyword", SqlDbType.VarChar).Value   = obj.SearchKeyword1;
            cmd.Parameters.AddWithValue("@Active", obj.Active1);


            con.Open();
            cmd.ExecuteNonQuery();
            con.Close();
            string Return = "Update";

            return(Return);
        }
예제 #2
0
        public string Brand_Insert(Brand_Class obj)
        {
            SqlConnection con = new SqlConnection(objCon.ConnectionReturn());
            SqlCommand    cmd = new SqlCommand("Brand_Insert", con);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@BrandName", obj.BrandName);
            cmd.Parameters.AddWithValue("@SequenceNo", obj.SequenceNo);
            cmd.Parameters.AddWithValue("@Active", obj.Active);
            cmd.Parameters.Add("@Return", SqlDbType.NVarChar, 50).Value = "";
            cmd.Parameters["@Return"].Direction = ParameterDirection.Output;
            con.Open();
            cmd.ExecuteNonQuery();
            con.Close();
            string Return = Convert.ToString(cmd.Parameters["@Return"].Value);

            return(Return);
        }
예제 #3
0
        public string Brand_Update(Brand_Class obj)
        {
            string Return = objModels.Brand_Update(obj);

            return(Return);
        }
예제 #4
0
        public string Brand_Insert(Brand_Class obj)
        {
            string Return = objModels.Brand_Insert(obj);

            return(Return);
        }