Exemplo n.º 1
0
        private void Move_Info(LibrariesInfo source_info, int dest_cid, CLibraries BLL)
        {
            if (source_info == null) return;

            LibrariesInfo 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);
        }
Exemplo n.º 2
0
        private bool Save_Lang(LibrariesInfo 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;

                    LibrariesInfo lang_info = info.copy();
                    lang_info.Id = 0;
                    lang_info.Status = (int)CConstants.State.Status.Waitactive;
                    CLibraries DALLibraries = new CLibraries(lang_val);
                    if (DALLibraries.Save(lang_info))
                    {
                        if (lang_info.lFileattach != null && lang_info.lFileattach.Count > 0)
                            if (new CFileattach(lang_val).Save(lang_info.lFileattach, lang_info.Id))
                                DALLibraries.Updatenum(lang_info.Id.ToString(), Queryparam.Sqlcolumn.Album, lang_info.lFileattach.Count);
                    }
                }
                return true;
            }
            catch
            {
                return false;
            }
        }
Exemplo n.º 3
0
        private void Copy_Info(LibrariesInfo source_info, int dest_cid, CLibraries BLL)
        {
            if (source_info == null) return;

            LibrariesInfo 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);
        }