예제 #1
0
        private void Move_Info(NewsInfo source_info, int dest_cid, CNews BLL)
        {
            if (source_info == null) return;

            NewsInfo info_copy = source_info.copy();
            info_copy.Cid = dest_cid;
            info_copy.Status = CCommon.GetStatus_upt();
            info_copy.Username = CCommon.Get_CurrentUsername();
            info_copy.Timeupdate = DateTime.Now;
            BLL.Save(info_copy);
        }
예제 #2
0
        private bool Save_Lang(NewsInfo info)
        {
            try
            {
                if (!CFunctions.IsMultiLanguage() || !chkSaveoption_golang.Checked) return false;

                int lang_num = CConstants.LANG_NUM;
                for (int i = 0; i < lang_num; i++)
                {
                    string lang_val = ConfigurationSettings.AppSettings["LANG_" + i];
                    if (lang_val == CCommon.LANG) continue;

                    NewsInfo lang_info = info.copy();
                    lang_info.Id = 0;
                    lang_info.Status = (int)CConstants.State.Status.Waitactive;
                    (new CNews(lang_val)).Save(lang_info);
                }
                return true;
            }
            catch
            {
                return false;
            }
        }
예제 #3
0
        private void Copy_Info(NewsInfo source_info, int dest_cid, CNews BLL)
        {
            if (source_info == null) return;

            NewsInfo info_copy = source_info.copy();
            info_copy.Id = 0;
            info_copy.Cid = dest_cid;
            info_copy.Status = CCommon.GetStatus_upt();
            info_copy.Username = CCommon.Get_CurrentUsername();
            info_copy.Timeupdate = DateTime.Now;
            info_copy.Allowcomment = source_info.Allowcomment > 0 ? 1 : 0;
            info_copy.Orderd = 0;
            BLL.Save(info_copy);
        }