private DataSet GetDataSetArticleType(string strArticleTypeCode) { DataSet dsArticleType = null; Hashtable hshParam = new Hashtable(); Gadget.Addparamater(ref hshParam, "AritcleTypeCode", strArticleTypeCode); dsArticleType = dbOperator.ProcessData("usp_GetAritcleType", hshParam, strDSN); return(dsArticleType); }
private DataSet GetArticleAddtionalByArticleID(string strArticleID) { DataSet dsArticleAdd = null; Hashtable hshParam = new Hashtable(); Gadget.Addparamater(ref hshParam, "ArticleID", strArticleID); dsArticleAdd = dbOperator.ProcessData("usp_GetArticleAddtionalByArticleID", hshParam, strDSN); return(dsArticleAdd); }
private static void ProcessDataAccess(string strUID, string strLogMsg, string strPosition) { string strDSN = Gadget.GetConnectionString("Expose178ComLog"); Hashtable hshParama = new Hashtable(); Gadget.Addparamater(ref hshParama, "SystemLogMsg", strLogMsg); Gadget.Addparamater(ref hshParama, "UpdatedByUserID", strUID); Gadget.Addparamater(ref hshParama, "SystemLogPosition", strPosition); Gadget.Addparamater(ref hshParama, "LastUpdatedDate", DateTime.Now.ToShortDateString()); dbOperator.ProcessData("usp_AddSystemLog", hshParama, strDSN); }
private DataSet UpdateDataSetArticleAddtional(Expose178.Com.Model.ArticleAddtional addtional) { DataSet dsAddtional = null; Hashtable hshParam = new Hashtable(); Gadget.Addparamater(ref hshParam, "ArticleID", addtional.ArticleID); Gadget.Addparamater(ref hshParam, "AdditionalID", addtional.AdditionalID); Gadget.Addparamater(ref hshParam, "ReadNum", addtional.ReadNum.ToString()); Gadget.Addparamater(ref hshParam, "ReplyNum", addtional.ReplyNum.ToString()); Gadget.Addparamater(ref hshParam, "UpdatedByUserID", addtional.UpdatedByUserID); dsAddtional = dbOperator.ProcessData("usp_AddUpdateArticleAdditionalByAdditionalID", hshParam, strDSN); return(dsAddtional); }
private DataSet GetDataSetArticleTitle() { DataSet dsArtileTitle = null; Hashtable hshParam = new Hashtable(); Gadget.Addparamater(ref hshParam, "AritcleTypeCode", AritcleTypeCode); Gadget.Addparamater(ref hshParam, "UpdatedByUserID", UpdatedByUserID); Gadget.Addparamater(ref hshParam, "IsAsc", IsAsc == true?"1":"0"); Gadget.Addparamater(ref hshParam, "IsReturnAll", IsReturnAll == true?"1":"0"); Gadget.Addparamater(ref hshParam, "PageSize", PageSize.ToString()); Gadget.Addparamater(ref hshParam, "PageIndex", PageIndex.ToString()); Gadget.Addparamater(ref hshParam, "SortField", SortField); dsArtileTitle = dbOperator.ProcessData("usp_GetArticleTitle", hshParam, strDSN); return(dsArtileTitle); }
private Expose178.Com.Model.AritcleType GetAritcleType(string strAritcleTypeCode) { Expose178.Com.Model.AritcleType arType = new Model.AritcleType(); DataSet dsAritcleType = null; Hashtable hshParam = new Hashtable(); Gadget.Addparamater(ref hshParam, "AritcleTypeCode", strAritcleTypeCode); dsAritcleType = dbOperator.ProcessData("usp_GetAritcleType", hshParam, strDSN); if (Gadget.DatatSetIsNotNullOrEmpty(dsAritcleType)) { arType.AritcleTypeCode = strAritcleTypeCode; arType.AritcleTypeDesc = Gadget.GetDataRowStringValue(dsAritcleType.Tables[0].Rows[0], "AritcleTypeDesc"); arType.LastUpdatedDate = Gadget.GetDataRowDateTimeValue(dsAritcleType.Tables[0].Rows[0], "LastUpdatedDate"); arType.UpdatedByUserID = Gadget.GetDataRowStringValue(dsAritcleType.Tables[0].Rows[0], "UpdatedByUserID"); } return(arType); }
public Expose178.Com.Model.User GetUserByEmailID(string strEmailID) { Expose178.Com.Model.User user = new Model.User(); DataSet dsUser = null; Hashtable hshParam = new Hashtable(); Gadget.Addparamater(ref hshParam, "UserID", strEmailID); dsUser = dbOperator.ProcessData("usp_GetUserByUserIDEmail", hshParam, strDSN); if (Gadget.DatatSetIsNotNullOrEmpty(dsUser)) { user.UserID = Gadget.GetDataRowStringValue(dsUser.Tables[0].Rows[0], "UserID");; user.UserName = Gadget.GetDataRowStringValue(dsUser.Tables[0].Rows[0], "UserName"); user.UserEmail = strEmailID; user.PwdHash = Gadget.GetDataRowStringValue(dsUser.Tables[0].Rows[0], "PwdHash"); user.PwdSalt = Gadget.GetDataRowStringValue(dsUser.Tables[0].Rows[0], "PwdSalt"); user.IsEffective = Gadget.GetDataRowBoolValue(dsUser.Tables[0].Rows[0], "IsEffective"); user.LastUpdatedDate = Gadget.GetDataRowDateTimeValue(dsUser.Tables[0].Rows[0], "LastUpdatedDate"); } return(user); }
public bool AddUpdateReplyToArticle(Expose178.Com.Model.ReplyToArticle reply) { DataSet dsReplyToArticle = null; Hashtable hshParam = new Hashtable(); Gadget.Addparamater(ref hshParam, "ArticleID", reply.ArticleID); Gadget.Addparamater(ref hshParam, "ReplyID", reply.ReplyID); Gadget.Addparamater(ref hshParam, "ReplyBody", reply.ReplyBody); Gadget.Addparamater(ref hshParam, "IsValidated", reply.IsValidated == true ? "1" : "0"); Gadget.Addparamater(ref hshParam, "UpdatedByUserID", reply.UpdatedByUserID); dsReplyToArticle = dbOperator.ProcessData("usp_AddUpdateReplyToArticleByReplyID", hshParam, strDSN); if (Gadget.DatatSetIsNotNullOrEmpty(dsReplyToArticle)) { return(true); } else { return(false); } }
public bool AddUpdateUser(Model.User user) { DataSet dsUser = null; Hashtable hshPamra = new Hashtable(); Gadget.Addparamater(ref hshPamra, "UserID", user.UserID); Gadget.Addparamater(ref hshPamra, "UserEmail", user.UserEmail); Gadget.Addparamater(ref hshPamra, "UserName", user.UserName); Gadget.Addparamater(ref hshPamra, "PwdHash", user.PwdHash); Gadget.Addparamater(ref hshPamra, "PwdSalt", user.PwdSalt); Gadget.Addparamater(ref hshPamra, "IsEffective", user.IsEffective == true?"1":"0"); Gadget.Addparamater(ref hshPamra, "IsTempUser", user.IsTempUser == true ? "1" : "0"); Gadget.Addparamater(ref hshPamra, "IP", user.IP); Gadget.Addparamater(ref hshPamra, "Browser", user.Browser); dsUser = dbOperator.ProcessData("usp_AddUpdateUserInfoByUserID", hshPamra, strDSN); if (Gadget.DatatSetIsNotNullOrEmpty(dsUser)) { return(true); } else { return(false); } }
public bool AddUpdateArticle(Expose178.Com.Model.Article article) { DataSet dsArticle = null; Hashtable hshParam = new Hashtable(); Gadget.Addparamater(ref hshParam, "ArticleID", article.ArticleID); Gadget.Addparamater(ref hshParam, "ArticleTile", article.ArticleTile); Gadget.Addparamater(ref hshParam, "ArticleBody", article.ArticleBody); Gadget.Addparamater(ref hshParam, "BackgroundImgUrl", article.BackgroundImgUrl); Gadget.Addparamater(ref hshParam, "IsDraft", article.IsDraft == true ? "1" : "0"); Gadget.Addparamater(ref hshParam, "IsValidated", article.IsValidated == true ? "1" : "0"); Gadget.Addparamater(ref hshParam, "UpdatedByUserID", article.UID); Gadget.Addparamater(ref hshParam, "ReadRoleTypeCode", article.ReadRoleTypeCode); Gadget.Addparamater(ref hshParam, "AritcleTypeCode", article.AritcleTypeCode); dsArticle = dbOperator.ProcessData("usp_AddUpdateArticleByArticleID", hshParam, strDSN); if (Gadget.DatatSetIsNotNullOrEmpty(dsArticle)) { return(true); } else { return(false); } }