Esempio n. 1
0
 public string CreateColumn(string colId)
 {
     B_SiteInfo SiteBll = new B_SiteInfo();
     B_Channel ChannelBll = new B_Channel();
     M_Site SiteModel = SiteBll.GetSiteModel();
     if (!SiteModel.IsStaticType)
     {
         return "fail$全站参数设置没有开启生成静态页面功能";
     }
     B_Column columnBll = new B_Column();
     M_Column columnModel = columnBll.GetColumn(int.Parse(colId));
     M_Channel channelModel = ChannelBll.GetChannel(columnModel.ChId);
     if (channelModel == null || !channelModel.IsStaticType)
     {
         return "fail$所属频道没有开启生成静态页面功能";
     }
     Session["createcolid"] = colId;
     return "succ$" + colId;
 }
Esempio n. 2
0
 public void Auditing(string tableName, string idStr, int status)
 {
     if (idStr != string.Empty)
     {
         B_Admin admin = new B_Admin();
         B_Column column = new B_Column();
         B_Channel channel = new B_Channel();
         string[] strArray = idStr.Split(new char[] { ',' });
         foreach (string str in strArray)
         {
             int id = int.Parse(str);
             DataRow info = this.dal.GetInfo(tableName, id);
             if (info == null)
             {
                 break;
             }
             int columnId = (int) info["colid"];
             M_Column column2 = column.GetColumn(columnId);
             if (column2 == null)
             {
                 break;
             }
             M_Channel channel2 = channel.GetChannel(column2.ChId);
             if (channel2 == null)
             {
                 break;
             }
             int num3 = (int) info["Status"];
             int num4 = (int) info["UserType"];
             int userId = (int) info["UId"];
             string str2 = info["UName"].ToString();
             string newValue = info["Title"].ToString();
             string str4 = channel2.Notice2.Replace("{@标题}", newValue);
             M_LoginAdmin loginModel = admin.GetLoginModel();
             int adiminId = loginModel.UserId;
             string loginName = loginModel.LoginName;
             this.dal.Auditing(tableName, id, status, adiminId, loginName);
             if ((((status == 3) && (num3 != 3)) && (num4 == 0)) && (userId > 0))
             {
                 B_WebMessage message = new B_WebMessage();
                 M_WebMessage message2 = new M_WebMessage();
                 message2.Title = "稿件采纳通知";
                 message2.Content = str4;
                 message2.IsRead = 0;
                 message2.IsSend = 1;
                 message2.ReceiverId = userId;
                 message2.ReceiverName = str2;
                 message2.SendId = 0;
                 message2.SendName = loginName;
                 message2.OverdueDate = DateTime.Now;
                 message2.AddDate = DateTime.Now;
                 message2.ReceiverDel = 0;
                 message2.SendDel = 0;
                 message.Insert(message2);
             }
             M_User user = new B_User().GetUser(userId);
             if (user == null)
             {
                 break;
             }
             B_UserGroup group = new B_UserGroup();
             M_UserGroup model = group.GetModel(user.GroupID);
             if (group == null)
             {
                 break;
             }
             int num7 = int.Parse(group.Power_UserGroup("Contribute", 0, model.GroupPower)) * column2.ScoreReward;
             new B_Money().Integral(num7, userId);
         }
     }
 }
Esempio n. 3
0
 public void Cancel(string tableName, int id)
 {
     B_Channel channel = new B_Channel();
     B_Column column = new B_Column();
     B_Admin admin = new B_Admin();
     DataRow info = this.dal.GetInfo(tableName, id);
     if (info != null)
     {
         int columnId = (int) info["colid"];
         M_Column column2 = column.GetColumn(columnId);
         if (column2 != null)
         {
             M_Channel channel2 = channel.GetChannel(column2.ChId);
             if (channel2 != null)
             {
                 int num2 = (int) info["UserType"];
                 int num3 = (int) info["UId"];
                 string str = info["UName"].ToString();
                 string newValue = info["Title"].ToString();
                 string str3 = channel2.Notice1.Replace("{@标题}", newValue);
                 string loginName = admin.GetLoginModel().LoginName;
                 this.dal.Cancel(tableName, id);
                 if ((num2 == 0) && (num3 > 0))
                 {
                     B_WebMessage message = new B_WebMessage();
                     M_WebMessage model = new M_WebMessage();
                     model.Title = "退稿通知";
                     model.Content = str3;
                     model.IsRead = 0;
                     model.IsSend = 1;
                     model.ReceiverId = num3;
                     model.ReceiverName = str;
                     model.SendId = 0;
                     model.SendName = loginName;
                     model.OverdueDate = DateTime.Now;
                     model.AddDate = DateTime.Now;
                     model.ReceiverDel = 0;
                     model.SendDel = 0;
                     message.Insert(model);
                 }
             }
         }
     }
 }