public int AddArticleModel(int articleID, string TitleText, string DescriptionText, DateTime CreateDate, string CreateUserText, int DepartmentText, string KeyWordText, int SetTopText)
{
SqlCommand sc = new SqlCommand("Article_ArticleModelAdd", myConnection);
sc.CommandType = CommandType.StoredProcedure;
object expectedValue = articleID;
sc.Parameters.Add(new SqlParameter("@articleID", expectedValue));
expectedValue = TitleText;
sc.Parameters.Add(new SqlParameter("@Title", expectedValue));
expectedValue = DescriptionText;
sc.Parameters.Add(new SqlParameter("@Description", expectedValue));
expectedValue = CreateDate;
sc.Parameters.Add(new SqlParameter("@CreateDate", expectedValue));
expectedValue = CreateUserText;
sc.Parameters.Add(new SqlParameter("@CreateUser", expectedValue));
expectedValue = DepartmentText;
sc.Parameters.Add(new SqlParameter("@CreateDepartment", expectedValue));
expectedValue = KeyWordText;
sc.Parameters.Add(new SqlParameter("@KeyWord", expectedValue));
expectedValue = SetTopText;
sc.Parameters.Add(new SqlParameter("@SetTop", expectedValue));
int ID = 0;
SqlParameter rtnval = sc.Parameters.Add(new SqlParameter("@ID", ID));
rtnval.Direction = ParameterDirection.Output;
myConnection.Open();
sc.ExecuteNonQuery();
ID = (int)rtnval.Value;
return ID;
}