public static void ChangeTopicStstus(int sysNo, AppEnum.TopicStatus st) { SqlParameter[] parms = new SqlParameter[] { new SqlParameter("@Status", SqlDbType.Int), new SqlParameter("@SysNo", SqlDbType.Int) }; parms[0].Value = (int)st; parms[1].Value = sysNo; SqlCommand cmd = new SqlCommand(SQL_CHANGE_TOPIC_STATUS); cmd.Parameters.AddRange(parms); cmd.CommandTimeout = 180; SqlHelper.ExecuteNonQuery(cmd); }
private static void UpdateTopicByType(int topicSysNo, int userSysNo, AppEnum.TopicUpdateType type, string topicSysNos) { string sqlStr; if (topicSysNos == string.Empty) sqlStr = SQL_UPDATE_TOPIC_BYTYPE.Replace("@SysNo", "SysNo=" + topicSysNo); else sqlStr = SQL_UPDATE_TOPIC_BYTYPE.Replace("@SysNo", "SysNo in (" + topicSysNos + ")"); int value; SqlParameter[] parms = new SqlParameter[] { new SqlParameter("@LastEditUserSysNo", SqlDbType.Int), new SqlParameter("@Value", SqlDbType.Int) }; switch (type) { case AppEnum.TopicUpdateType.AbandonTopic: sqlStr = sqlStr.Replace("@Key", "Status"); value = (int)AppEnum.TopicStatus.Abandon; break; case AppEnum.TopicUpdateType.CancelAbandonTopic: sqlStr = sqlStr.Replace("@Key", "Status"); if (TopicReplyDac.HasSysReply(topicSysNo)) value = (int)AppEnum.TopicStatus.Replyed;// 2; else value = (int)AppEnum.TopicStatus.confirmed;//1; break; case AppEnum.TopicUpdateType.TopicCancelDigset: sqlStr = sqlStr.Replace("@Key", "IsDigest"); value = 0; break; case AppEnum.TopicUpdateType.TopicSetDigset: sqlStr = sqlStr.Replace("@Key", "IsDigest"); value = 1; break; case AppEnum.TopicUpdateType.TopicCancelTop: sqlStr = sqlStr.Replace("@Key", "IsTop"); value = 0; break; case AppEnum.TopicUpdateType.TopicSetTop: sqlStr = sqlStr.Replace("@Key", "IsTop"); value = 1; break; case AppEnum.TopicUpdateType.ConfirmTopic: sqlStr = sqlStr.Replace("@Key", "Status"); if (TopicReplyDac.HasSysReply(topicSysNo)) value = (int)AppEnum.TopicStatus.Replyed;// 2; else value = (int)AppEnum.TopicStatus.confirmed;//1; break; case AppEnum.TopicUpdateType.UnConfirmTopic: sqlStr = sqlStr.Replace("@Key", "Status"); value = (int)AppEnum.TopicStatus.unconfirmed; ; break; default: throw new ArgumentException("Topic Update Type is invalid."); } parms[0].Value = userSysNo; parms[1].Value = value; SqlCommand cmd = new SqlCommand(sqlStr); cmd.Parameters.AddRange(parms); cmd.CommandTimeout = 180; SqlHelper.ExecuteNonQuery(cmd); if (topicSysNos == string.Empty) UpdateProductRemarkCountAndScoreByTopicSysNo(topicSysNo); else { foreach (string s in topicSysNos.Split(new char[] { ',' })) { UpdateProductRemarkCountAndScoreByTopicSysNo(int.Parse(s.Trim())); } } }
public static void UpdateTopicsByType(string topicSysNos, int userSysNo, AppEnum.TopicUpdateType type) { UpdateTopicByType(0, userSysNo, type, topicSysNos); }
public static void UpdateTopicByType(int topicSysNo, int userSysNo, AppEnum.TopicUpdateType type) { UpdateTopicByType(topicSysNo, userSysNo, type, string.Empty); }
public static void AbandTopicImages(string sysNos, AppEnum.TopicImageStatus status) { AbandTopicImage(0, status, sysNos); }
private static void AbandTopicImage(int topicImageSysNo, AppEnum.TopicImageStatus status, string sysNos) { string sqlStr; if (sysNos == string.Empty) sqlStr = SQL_UPDATE_TOPICIMAGE_STATUS.Replace("SysNo=@SysNo", "SysNo=" + topicImageSysNo); else sqlStr = SQL_UPDATE_TOPICIMAGE_STATUS.Replace("SysNo=@SysNo", "SysNo in (" + sysNos + ")"); SqlParameter[] parms = new SqlParameter[] { new SqlParameter("@Status", SqlDbType.Int), }; parms[0].Value = (int)status; SqlCommand cmd = new SqlCommand(sqlStr); cmd.Parameters.AddRange(parms); cmd.CommandTimeout = 180; SqlHelper.ExecuteNonQuery(cmd); }
public static void AbandTopicImage(int topicImageSysNo, AppEnum.TopicImageStatus status) { AbandTopicImage(topicImageSysNo, status, string.Empty); }
public static void AddTopicReplyBySysUser(TopicReplyInfo reply, AppEnum.TopicStatus ts) { TopicReplyDac.InsertTopicReply(reply); TopicDac.ChangeTopicStstus(reply.TopicSysNo, AppEnum.TopicStatus.Replyed); }
/// <summary> /// MAP����ϵͳ�пͻ��Ķ�ӦȨ�� /// </summary> /// <param name="cRank"></param> /// <returns></returns> public static AppEnum.TopicCustomerRight GetTopicCustomerRight(AppEnum.CustomerRank cRank) { AppEnum.TopicCustomerRight oRes = AppEnum.TopicCustomerRight.A1; switch (cRank) { case AppEnum.CustomerRank.OneStar: case AppEnum.CustomerRank.TwoStar: case AppEnum.CustomerRank.ThreeStar: oRes = AppEnum.TopicCustomerRight.A1; break; case AppEnum.CustomerRank.FourStar: case AppEnum.CustomerRank.FiveStar: case AppEnum.CustomerRank.Golden: oRes = AppEnum.TopicCustomerRight.B2; break; case AppEnum.CustomerRank.Diamond: case AppEnum.CustomerRank.VIP: oRes = AppEnum.TopicCustomerRight.C3; break; } return oRes; }
/// <summary> /// �����û�Ȩ��ȡ�û������ϴ�ͼƬ������ /// </summary> /// <param name="cusRank"></param> /// <returns></returns> public static int GetNumOfUpImageByCustomerRank(AppEnum.CustomerRank cusRank) { AppEnum.TopicCustomerRight topicCusRight = GetTopicCustomerRight(cusRank); int outNum = 0; switch (topicCusRight) { case AppEnum.TopicCustomerRight.A1: outNum = 1; break; case AppEnum.TopicCustomerRight.B2: outNum = 3; break; case AppEnum.TopicCustomerRight.C3: outNum = 5; break; } return outNum; }
public static void AbandTopicReplys(string sysNos, int userSysNo, AppEnum.TopicReplyStatus status) { AbandTopicReply(0, userSysNo, status, sysNos); }
public static void AbandTopicReply(int topicReplySysNo, int userSysNo, AppEnum.TopicReplyStatus status) { AbandTopicReply(topicReplySysNo, userSysNo, status, string.Empty); }