Пример #1
0
        /// <summary>
        /// Doc tu file EmailTemplate_....txt
        /// </summary>
        /// <param name="inputValue"><ReqestParams Email="*****@*****.**" Context="CONGAN|KHACHHANG|PHANHOI_CAPNHAT|PHANHOI_TUCHOI" /></param>
        /// <returns></returns>
        private string GetEmailTemplate(string inputValue)
        {
            string fileTemplate = HttpContext.Current.Server.MapPath("..") + "\\Asset\\Class\\";
            string Context      = "";

            //string localInputValue = "<Root>" + inputValue + "</Root>";
            Context = CXML.GetXmlNodeValue(inputValue, "RequestParams/@Context");
            switch (Context)
            {
            case "CONGAN": fileTemplate += TEMPLATE_GUICONGAN; break;

            case "KHACHHANG": fileTemplate += TEMPLATE_GUIKHACHHANG; break;

            case "PHANHOI_CAPNHAT": fileTemplate += TEMPLATE_GUIPHANHOI_CAPNHAT; break;

            case "PHANHOI_TUCHOI": fileTemplate += TEMPLATE_GUIPHANHOI_TUCHOI; break;

            case "THONGBAO_PHI": fileTemplate += TEMPLATE_GUIKHACHHANG_TBPHI; break;

            case "KHACHHANG_GCN": fileTemplate += TEMPLATE_GUIKHACHHANG_GCN; break;

            case "HANOI_TBHUY": fileTemplate += TEMPLATE_GUIHANOI_TBHUY; break;

            case "KHACHANG_HUYTBGT": fileTemplate += TEMPLATE_GUIKHACHHANG_GCN; break;

            case "KHACHANG_TBNHACNO": fileTemplate += TEMPLATE_GUIKHACHHANG_TBNHACNO; break;
            }
            return(ReadFileContent(fileTemplate));
        }
Пример #2
0
        private void SendEmail()
        {
            string context  = "";
            int    ReportID = 18;

            //Luu thong tin
            UpdateSoDonNhan();

            string inputValue = "<RequestParams RefType=\"{6}\" Context=\"{3}\" RefNo=\"{0}\" ViewID=\"38\" ViewerID=\"{5}\" ID=\"{4}\" IncludeSign=\"1\" Email=\"{7}\" SoNhanDon=\"{8}\" FileNumber=\"{9}\"/>";

            inputValue = string.Format(inputValue, CXML.HtmlEnCode(this.CurrentTransaction.RefNo), CSession.UserID, CSession.CLIENT_KEY, context, this.CurrentTransaction.ID, ReportID, this.CurrentTransaction.RefType, EmailKH, txtNumber.Text, this.CurrentTransaction.FileNumber);
            inputValue = CXML.AddAuthenticate(inputValue);

            string result = CServiceReference.AssetService.SendGCN(CSession.CLIENT_KEY, inputValue);

            //FWS.TTDKGDTS.ImportTool.ServiceReference.Soap.CApplicationMessage message = CServiceReference.AssetService.UpdateAndSendReport(CSession.CLIENT_KEY, inputValue);
            BusinessObject.CApplicationMessage message = CObjectMapper.FromCSV <BusinessObject.CApplicationMessage>(result)[0];

            if (message.IsSuccessfull)
            {
                ShowInfo(message.Description);
            }
            else
            {
                ShowError(message.Description);
            }
        }
Пример #3
0
        private static bool GetUpdate()
        {
            string input = CXML.AddAuthenticate("<RequestParams Function=\"VersionInfo\" />");
            string data  = CServiceReference.CoreService.GetContextData(CSession.CLIENT_KEY, input);

            List <CVersionInfo> versions = CObjectMapper.FromCSV <CVersionInfo>(data, 1);

            if (versions != null && versions.Count > 0)
            {
                //Neu co version moi
                IniFile mIni           = new IniFile(Application.StartupPath + "\\Version.ini");
                string  currentVersion = Application.ProductVersion;// mIni.IniReadValue("Version", "iProfile_TradingOnline");
                //Neu co Version moi
                if (!currentVersion.Equals(versions[0].Version))
                {
                    //Luu version va link download vao file Ini de chuong trinh update cap nhat
                    mIni.IniWriteValue("Version", "iProfile_TradingOnline", versions[0].Version);
                    mIni.IniWriteValue("Link", "iProfile_TradingOnline", versions[0].LinkUpdate);

                    //Goi chuong trinh update
                    Process prLiveUpdate = new Process();
                    prLiveUpdate.StartInfo.FileName = Application.StartupPath + "\\LiveUpdate.exe";
                    prLiveUpdate.Start();
                    //GlobalDeleteAtom(Atom);
                    return(false);
                }
            }

            return(true);
        }
Пример #4
0
        private void SendEmail()
        {
            string context = "HANOI_TBHUY";

            //int ReportID = 18;
            //Luu thong tin
            //UpdateInfo();

            if (UpdateTransaction())
            {
                string inputValue = "<RequestParams Context=\"{0}\" RegisTransRefNo=\"{1}\" ViewID=\"35\" ViewerID=\"25\" RefNo=\"{2}\" ObjectID=\"{3}\" Email=\"{4}\" IncludeSign=\"1\"/>";
                inputValue = string.Format(inputValue, context, CXML.HtmlEnCode(this.CurrentTransaction.RegisTransRefNo), CXML.HtmlEnCode(this.RefNo), this.ObjectID, txtEmail.Text);
                inputValue = CXML.AddAuthenticate(inputValue);

                string result = CServiceReference.AssetService.SendReport(CSession.CLIENT_KEY, inputValue);
                //FWS.TTDKGDTS.ImportTool.ServiceReference.Soap.CApplicationMessage message = CServiceReference.AssetService.UpdateAndSendReport(CSession.CLIENT_KEY, inputValue);
                BusinessObject.CApplicationMessage message = CObjectMapper.FromCSV <BusinessObject.CApplicationMessage>(result)[0];

                if (message.IsSuccessfull)
                {
                    ShowInfo(message.Description);
                }
                else
                {
                    ShowError(message.Description);
                }
            }
            else
            {
                ShowError(Message);
            }
        }
        public override IEnumerable <XElement> GetCXMLFacets()
        {
            IList <XElement> facets = new List <XElement>();

            AddNonNullToList(facets, CXML.MakeStringFacet(ClipFlairMetadataFacets.FACET_FILENAME, Filename));

            AddNonNullToList(facets, CXML.MakeStringFacet(ActivityMetadataFacets.FACET_FOR_LEARNERS, ForLearners));
            AddNonNullToList(facets, CXML.MakeStringFacet(ActivityMetadataFacets.FACET_FOR_SPEAKERS, ForSpeakers));
            AddNonNullToList(facets, CXML.MakeStringFacet(ActivityMetadataFacets.FACET_LANGUAGE_COMBINATION, LanguageCombination));
            AddNonNullToList(facets, CXML.MakeStringFacet(ActivityMetadataFacets.FACET_LEVEL, Level));
            AddNonNullToList(facets, CXML.MakeStringFacet(ActivityMetadataFacets.FACET_ESTIMATED_TIME, EstimatedTimeMinutes));
            AddNonNullToList(facets, CXML.MakeStringFacet(ActivityMetadataFacets.FACET_FROM_SKILLS, FromSkills));
            AddNonNullToList(facets, CXML.MakeStringFacet(ActivityMetadataFacets.FACET_TO_SKILLS, ToSkills));
            AddNonNullToList(facets, CXML.MakeStringFacet(ActivityMetadataFacets.FACET_AV_SKILLS, AVSkills));
            AddNonNullToList(facets, CXML.MakeStringFacet(ActivityMetadataFacets.FACET_RESPONSES, Responses));
            AddNonNullToList(facets, CXML.MakeStringFacet(ActivityMetadataFacets.FACET_TASKS_REVOICING, TasksRevoicing));
            AddNonNullToList(facets, CXML.MakeStringFacet(ActivityMetadataFacets.FACET_TASKS_CAPTIONING, TasksCaptioning));
            AddNonNullToList(facets, CXML.MakeStringFacet(ActivityMetadataFacets.FACET_LEARNER_TYPE, LearnerType));
            AddNonNullToList(facets, CXML.MakeStringFacet(ActivityMetadataFacets.FACET_FEEDBACK_MODE_TO_LEARNER, FeedbackModeToLearner));

            AddNonNullToList(facets, CXML.MakeStringFacet(ClipFlairMetadataFacets.FACET_AGE_GROUP, AgeGroup));
            AddNonNullToList(facets, CXML.MakeStringFacet(ClipFlairMetadataFacets.FACET_KEYWORDS, Keywords));
            AddNonNullToList(facets, CXML.MakeStringFacet(ClipFlairMetadataFacets.FACET_AUTHORS_SOURCE, AuthorSource));
            AddNonNullToList(facets, CXML.MakeStringFacet(ClipFlairMetadataFacets.FACET_LICENSE, License));

            AddNonNullToList(facets, CXML.MakeDateTimeFacet(ClipFlairMetadataFacets.FACET_FIRST_PUBLISHED, FirstPublished));
            AddNonNullToList(facets, CXML.MakeDateTimeFacet(ClipFlairMetadataFacets.FACET_LAST_UPDATED, LastUpdated));

            return(facets);
        }
        public static IEnumerable <XElement> MakeActivityFacetCategories() //the following also defines the order in which facets appear in PivotViewer's filters and details panes
        {
            IList <XElement> result = new List <XElement>();

            result.Add(CXML.MakeFacetCategory(ClipFlairMetadataFacets.FACET_FILENAME, CXML.VALUE_STRING, null, isFilterVisible: false, isMetadataVisible: false, isWordWheelVisible: false));

            result.Add(CXML.MakeFacetCategory(ActivityMetadataFacets.FACET_FOR_LEARNERS, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(ActivityMetadataFacets.FACET_FOR_SPEAKERS, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(ActivityMetadataFacets.FACET_LANGUAGE_COMBINATION, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(ActivityMetadataFacets.FACET_LEVEL, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(ActivityMetadataFacets.FACET_ESTIMATED_TIME, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(ActivityMetadataFacets.FACET_FROM_SKILLS, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(ActivityMetadataFacets.FACET_TO_SKILLS, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(ActivityMetadataFacets.FACET_AV_SKILLS, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(ActivityMetadataFacets.FACET_RESPONSES, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(ActivityMetadataFacets.FACET_TASKS_REVOICING, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(ActivityMetadataFacets.FACET_TASKS_CAPTIONING, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(ActivityMetadataFacets.FACET_LEARNER_TYPE, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(ActivityMetadataFacets.FACET_FEEDBACK_MODE_TO_LEARNER, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            result.Add(MakeAgeGroupFacetCategory());
            result.Add(CXML.MakeFacetCategory(ClipFlairMetadataFacets.FACET_KEYWORDS, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(ClipFlairMetadataFacets.FACET_AUTHORS_SOURCE, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(ClipFlairMetadataFacets.FACET_LICENSE, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            result.Add(CXML.MakeFacetCategory(ClipFlairMetadataFacets.FACET_FIRST_PUBLISHED, CXML.VALUE_DATETIME, CXML.DEFAULT_DATETIME_FORMAT, isFilterVisible: false, isMetadataVisible: true, isWordWheelVisible: false));
            result.Add(CXML.MakeFacetCategory(ClipFlairMetadataFacets.FACET_LAST_UPDATED, CXML.VALUE_DATETIME, CXML.DEFAULT_DATETIME_FORMAT, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: false));
            return(result);
        }
Пример #7
0
 private BusinessObject.CApplicationMessage InsertTransaction(CTransaction trans)
 {
     try
     {
         string requestParams = trans.GetRequestParams(" Function=\"Transaction_Asset\" Action=\"IMPORTTOOL\" ");
         //XmlDocument doc = new XmlDocument();
         //doc.LoadXml(requestParams);
         //CCoreService service = new CCoreService();
         requestParams = CXML.AddAuthenticate(requestParams);
         string result = CServiceReference.CoreService.ExecuteAction(CLIENT_KEY, FWS.VnAccounting.Service.Data.Utils.CXML.HtmlEnCode(requestParams));
         List <BusinessObject.CApplicationMessage> message = CObjectMapper.FromCSV <BusinessObject.CApplicationMessage>(result, 1);
         if (message[0].IsSuccessfull)
         {
             //trans.ID = int.Parse(message[0].Result.ToString());
             return(message[0]);
         }
         //MessageBox.Show(message[0].Description);
         return(message[0]);
     }
     catch (Exception ex)
     {
         return(new BusinessObject.CApplicationMessage()
         {
             Description = ex.Message
         });
     }
 }
Пример #8
0
 private void txtNumber_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Tab)
         {
             string inputValue = "<RequestParams Function=\"::R|DOC|Items_NhanDon\" Number=\"{0}\" FromDate=\"{1}\" />";
             inputValue = string.Format(inputValue, txtNumber.Text, string.Format("{0}-{1}-{2}", txtReceiveYear.Text, txtReceiveMonth.Text, txtReceiveDay.Text));
             inputValue = CXML.AddAuthenticate(inputValue);
             string          data = CServiceReference.CoreService.GetContextData(CSession.CLIENT_KEY, inputValue);
             List <CNhanDon> list = CObjectMapper.FromCSV <CNhanDon>(data, 1);
             if (list != null && list.Count > 0)
             {
                 txtEmail.Text = list[0].Email;
             }
             else
             {
                 txtEmail.Text = "";
             }
             txtEmail.Focus();
             HandleKeyDown = true;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Пример #9
0
        public static IEnumerable <XElement> GetCXMLFacetCategories(IList <XElement> result = null) //the following also defines the order in which filters appear in PivotViewer's filter pane
        {
            if (result == null)
            {
                result = new List <XElement>();
            }

            //Common metadata (header)//

            TrafilmMetadataFacets.GetCXMLFacetCategories_Header(result);

            //Linked Data: Calculatable from Conversation//

            result.Add(CXML.MakeFacetCategory(L3STinstanceMetadataFacets.FACET_CONVERSATION_START_TIME, CXML.VALUE_NUMBER, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: false));
            result.Add(CXML.MakeFacetCategory(L3STinstanceMetadataFacets.FACET_CONVERSATION_DURATION, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: false));

            //Linked Data: Calculatable from Film//

            result.Add(CXML.MakeFacetCategory(L3STinstanceMetadataFacets.FACET_L1_LANGUAGE, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            //L3STinstance metadata//

            result.Add(CXML.MakeFacetCategory(L3STinstanceMetadataFacets.FACET_L3ST_LANGUAGE_TYPE, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(L3STinstanceMetadataFacets.FACET_L3ST_LANGUAGE, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            result.Add(CXML.MakeFacetCategory(L3STinstanceMetadataFacets.FACET_L3ST_CONSTRUCTED_BASED_ON, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            result.Add(CXML.MakeFacetCategory(L3STinstanceMetadataFacets.FACET_L3ST_AUDIENCE_UNDERSTANDING, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(L3STinstanceMetadataFacets.FACET_L3ST_MESSAGE_UNDERSTANDING, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(L3STinstanceMetadataFacets.FACET_L3ST_MEANING_DECIPHERABLE, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            result.Add(CXML.MakeFacetCategory(L3STinstanceMetadataFacets.FACET_L3ST_SPEAKER_PERFORMANCE, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: false));

            result.Add(CXML.MakeFacetCategory(L3STinstanceMetadataFacets.FACET_L3ST_MODE, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            result.Add(CXML.MakeFacetCategory(L3STinstanceMetadataFacets.FACET_L3ST_REPRESENTED, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(L3STinstanceMetadataFacets.FACET_L3ST_REPRESENTATIONS_ORAL, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(L3STinstanceMetadataFacets.FACET_L3ST_REPRESENTATIONS_VISUAL, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            result.Add(CXML.MakeFacetCategory(L3STinstanceMetadataFacets.FACET_L3ST_FUNCTIONS, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(L3STinstanceMetadataFacets.FACET_L3ST_CONVERSATION_FEATURES, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            result.Add(CXML.MakeFacetCategory(L3STinstanceMetadataFacets.FACET_L3ST_SOURCES, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            //Linked Data: Calculatable from L3TTinstances//

            result.Add(CXML.MakeFacetCategory(L3STinstanceMetadataFacets.FACET_L3TT_INSTANCE_COUNT, CXML.VALUE_NUMBER, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: false));

            //Common metadata (footer)//

            TrafilmMetadataFacets.GetCXMLFacetCategories_Footer(result);

            //Linked Data: References//

            result.Add(CXML.MakeFacetCategory(L3STinstanceMetadataFacets.FACET_FILM_REFERENCE_ID, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(L3STinstanceMetadataFacets.FACET_CONVERSATION_REFERENCE_ID, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            return(result);
        }
Пример #10
0
        public string ExecuteAction(string ClientKey, string inputValue)
        {
            inputValue = CXML.HtmlDecode(inputValue);

            DataSet ds = new CCoreDao().ExecuteAction(ClientKey, inputValue);

            return(CDataParser.DataSetToCSV(ds));
        }
Пример #11
0
        public string GetContextData(string ClientKey, string inputValue)
        {
            inputValue = CXML.HtmlDecode(inputValue);
            CLogManager.WritePL("GetContextData", "End write response");
            DataSet ds = new CCoreDao().GetContextData(ClientKey, inputValue);

            CLogManager.WritePL("GetContextData", "End write response");
            return(CDataParser.DataSetToCSV(ds));
        }
Пример #12
0
        public override IEnumerable <XElement> GetCXMLFacets(IList <XElement> facets = null)
        {
            if (facets == null)
            {
                facets = new List <XElement>();
            }

            //Common metadata//

            base.GetCXMLFacets(facets);

            //Linked Data: Calculatable from Conversation//

            AddNonNullToList(facets, CXML.MakeNumberFacet(L3STinstanceMetadataFacets.FACET_CONVERSATION_START_TIME, ConversationStartTime));
            AddNonNullToList(facets, CXML.MakeStringFacet(L3STinstanceMetadataFacets.FACET_CONVERSATION_DURATION, ConversationDuration));

            //Linked Data: Calculatable from Film//

            AddNonNullToList(facets, CXML.MakeStringFacet(L3STinstanceMetadataFacets.FACET_L1_LANGUAGE, L1language));

            //L3STinstance metadata//

            AddNonNullToList(facets, CXML.MakeStringFacet(L3STinstanceMetadataFacets.FACET_L3ST_LANGUAGE_TYPE, L3STlanguageType));
            AddNonNullToList(facets, CXML.MakeStringFacet(L3STinstanceMetadataFacets.FACET_L3ST_LANGUAGE, L3STlanguage));

            AddNonNullToList(facets, CXML.MakeStringFacet(L3STinstanceMetadataFacets.FACET_L3ST_CONSTRUCTED_BASED_ON, L3STconstructedBasedOn));

            AddNonNullToList(facets, CXML.MakeStringFacet(L3STinstanceMetadataFacets.FACET_L3ST_AUDIENCE_UNDERSTANDING, L3STaudienceUnderstanding));
            AddNonNullToList(facets, CXML.MakeStringFacet(L3STinstanceMetadataFacets.FACET_L3ST_MESSAGE_UNDERSTANDING, L3STmessageUnderstanding));
            AddNonNullToList(facets, CXML.MakeStringFacet(L3STinstanceMetadataFacets.FACET_L3ST_MEANING_DECIPHERABLE, L3STmeaningDecipherable));

            AddNonNullToList(facets, CXML.MakeStringFacet(L3STinstanceMetadataFacets.FACET_L3ST_SPEAKER_PERFORMANCE, L3STspeakerPerformance));

            AddNonNullToList(facets, CXML.MakeStringFacet(L3STinstanceMetadataFacets.FACET_L3ST_MODE, L3STmode));

            AddNonNullToList(facets, CXML.MakeStringFacet(L3STinstanceMetadataFacets.FACET_L3ST_REPRESENTED, L3STrepresented));
            AddNonNullToList(facets, CXML.MakeStringFacet(L3STinstanceMetadataFacets.FACET_L3ST_REPRESENTATIONS_ORAL, L3STrepresentationsOral));
            AddNonNullToList(facets, CXML.MakeStringFacet(L3STinstanceMetadataFacets.FACET_L3ST_REPRESENTATIONS_VISUAL, L3STrepresentationsVisual));

            AddNonNullToList(facets, CXML.MakeStringFacet(L3STinstanceMetadataFacets.FACET_L3ST_FUNCTIONS, L3STfunctions));
            AddNonNullToList(facets, CXML.MakeStringFacet(L3STinstanceMetadataFacets.FACET_L3ST_CONVERSATION_FEATURES, L3STconversationFeatures));

            AddNonNullToList(facets, CXML.MakeStringFacet(L3STinstanceMetadataFacets.FACET_L3ST_SOURCES, L3STsources));

            //Linked Data: Calculatable from L3TTinstances//

            AddNonNullToList(facets, CXML.MakeNumberFacet(L3STinstanceMetadataFacets.FACET_L3TT_INSTANCE_COUNT, L3TTinstanceCount));

            //LinkedData: References//

            AddNonNullToList(facets, CXML.MakeStringFacet(L3STinstanceMetadataFacets.FACET_FILM_REFERENCE_ID, FilmReferenceId));
            AddNonNullToList(facets, CXML.MakeStringFacet(L3STinstanceMetadataFacets.FACET_CONVERSATION_REFERENCE_ID, ConversationReferenceId));

            return(facets);
        }
Пример #13
0
        private CApplicationMessage SendReportViaEmail(string inputValue, byte[] pdfFile, string otherAttachName, byte[] otherAttachContent)
        {
            // gui mail cho KH, CA
            // lay thong tin email tu input
            // lay thong tin noi dung mail
            // lay thong tin noi dung
            // lay file pdf export
            // gui mail voi file pdf attach

            string email           = "";
            string subject         = "";
            string body            = "";
            string attacthFileName = "";

            byte[] attacthFileContent = null;

            email = CXML.GetXmlNodeValue(inputValue, "RequestParams/@Email");
            CApplicationMessage message = new CApplicationMessage();

            try
            {
                string fileContent = GetEmailTemplate(inputValue);

                GetEmailContentFromTemplate(fileContent, out subject, out body);

                attacthFileName    = "ThongBao.pdf";
                attacthFileContent = pdfFile;// GetReportPdf(inputValue);
                if (attacthFileContent == null && otherAttachContent != null)
                {
                    attacthFileName    = otherAttachName;
                    attacthFileContent = otherAttachContent;
                    otherAttachName    = "";
                    otherAttachContent = null;
                }
                string sendResult = CServiceReference.Callcenter.SendMail(email, "", "", subject, body, attacthFileName, attacthFileContent, otherAttachName, otherAttachContent, "", null);
                if (sendResult.StartsWith("00"))
                {
                    message.Result      = 1;
                    message.Description = sendResult;
                }
                else
                {
                    message.Description = sendResult;
                }
                return(message);
            }
            catch (Exception ex)
            {
                message.Description = ex.Message;
                message.Result      = null;
                return(message);
            }
        }
Пример #14
0
        private void GetInfoByOriginalRefNo_1(string OrgRefNo)
        {
            if (string.IsNullOrEmpty(OrgRefNo))
            {
                return;
            }

            CCoreService service    = new CCoreService();
            string       inputValue = string.Format("<InputValue UserID=\"{1}\" /><RequestParams Function='GetTransaction_Asset' RefType='22' RegisTransRefNo='{0}'/>", OrgRefNo, CSession.UserID);

            inputValue = inputValue + string.Format("<RequestParams Function=\"GetTransaction_Asset\" RefType=\"21\" RefNo=\"{0}\" Context=\"AssetsList\"/>", OrgRefNo);
            inputValue = inputValue + string.Format("<RequestParams Function=\"GetTransaction_Asset\" RefType=\"21\" RefNo=\"{0}\" Context=\"AssetOwnerList\"/>", OrgRefNo);
            string datacsv = service.GetContextData(CSession.CLIENT_KEY, CXML.HtmlEnCode(inputValue));

            IList <CTransaction> trans  = CObjectMapper.FromCSV <CTransaction>(datacsv, 1);
            List <Asset>         asset  = CObjectMapper.FromCSV <Asset>(datacsv, 2);
            List <Person>        ownner = CObjectMapper.FromCSV <Person>(datacsv, 3);

            if (trans != null && trans.Count > 0)
            {
                if (CurrentTransaction.Assets == null || CurrentTransaction.Assets.Count == 0)
                {
                    CurrentTransaction.Assets = asset;
                }

                if (CurrentTransaction.AssetOwnerID == 0 && !string.IsNullOrEmpty(CurrentTransaction.AssetOwnerName))
                {
                    CurrentTransaction.AssetOwnerID = trans[0].AssetOwnerID;
                }

                if (string.IsNullOrEmpty(CurrentTransaction.AssetOwnerName))
                {
                    CurrentTransaction.AssetOwnerName = trans[0].AssetOwnerName;
                }

                if (string.IsNullOrEmpty(CurrentTransaction.AssetPersonalCode))
                {
                    CurrentTransaction.AssetPersonalCode = trans[0].AssetPersonalCode;
                }

                if (CurrentTransaction.AssetOwnnerList == null || CurrentTransaction.AssetOwnnerList.Count == 0)
                {
                    CurrentTransaction.AssetOwnnerList = ownner;
                }

                BindingSource source = new BindingSource();
                source.DataSource        = CurrentTransaction.AssetOwnnerList;
                grAssetOwnner.DataSource = source;
            }
        }
Пример #15
0
        private BusinessObject.CApplicationMessage UpdateInfo()
        {
            string inputValue = "<RequestParams RefType=\"28\" Context=\"TOOL\" Function=\"Transaction_Asset\" Action=\"UpdateSendEmail\" ID=\"{0}\" Email=\"{1}\" />";

            inputValue = string.Format(inputValue, this.CurrentTransaction.ID, txtEmail.Text);
            inputValue = CXML.AddAuthenticate(inputValue);
            string result = CServiceReference.CoreService.ExecuteAction(CSession.CLIENT_KEY, inputValue);
            List <BusinessObject.CApplicationMessage> mess = CObjectMapper.FromCSV <BusinessObject.CApplicationMessage>(result);

            if (mess != null && mess.Count > 0)
            {
                return(mess[0]);
            }
            return(null);
        }
Пример #16
0
        private CApplicationMessage UpdateSoDonNhan()
        {
            string inputValue = "<RequestParams RefType=\"21\" Context=\"TOOL\" Function=\"Transaction_Asset\" Action=\"UpdateGCNEmail\" RefNo=\"{0}\" ID=\"{1}\" SoDonNhan=\"{2}\" SendGCNEmail=\"{3}\"/>";

            inputValue = string.Format(inputValue, CXML.HtmlEnCode(this.CurrentTransaction.RefNo), this.CurrentTransaction.ID, txtNumber.Text, txtEmail.Text);
            inputValue = CXML.AddAuthenticate(inputValue);
            string result = CServiceReference.CoreService.ExecuteAction(CSession.CLIENT_KEY, inputValue);
            List <CApplicationMessage> mess = CObjectMapper.FromCSV <CApplicationMessage>(result);

            if (mess != null && mess.Count > 0)
            {
                return(mess[0]);
            }
            return(null);
        }
        public static IEnumerable <XElement> GetCXMLFacetCategories(IList <XElement> result = null) //the following also defines the order in which filters appear in PivotViewer's filter pane
        {
            if (result == null)
            {
                result = new List <XElement>();
            }

            //Common metadata (header)//

            TrafilmMetadataFacets.GetCXMLFacetCategories_Header(result);

            //Film metadata//

            result.Add(CXML.MakeFacetCategory(FilmMetadataFacets.FACET_FILM_OR_SEASON_TITLE, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true)); //Calculatable from Film

            result.Add(CXML.MakeFacetCategory(FilmMetadataFacets.FACET_TYPE, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            result.Add(CXML.MakeFacetCategory(FilmMetadataFacets.FACET_DURATION, CXML.VALUE_NUMBER, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: false));

            result.Add(CXML.MakeFacetCategory(FilmMetadataFacets.FACET_SERIES, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            result.Add(CXML.MakeFacetCategory(FilmMetadataFacets.FACET_DIRECTORS, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(FilmMetadataFacets.FACET_SCRIPTWRITERS, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            result.Add(CXML.MakeFacetCategory(FilmMetadataFacets.FACET_PRODUCTION_COUNTRIES, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(FilmMetadataFacets.FACET_PRODUCTION_COMPANIES, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            result.Add(CXML.MakeFacetCategory(FilmMetadataFacets.FACET_BLOCKBUSTER, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: false));

            result.Add(CXML.MakeFacetCategory(FilmMetadataFacets.FACET_YEAR_ST_RELEASED, CXML.VALUE_NUMBER, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: false));
            result.Add(CXML.MakeFacetCategory(FilmMetadataFacets.FACET_L1_LANGUAGE, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            //Linked Data: Calculatable from Conversations.L3STinstances.L3TTinstances//

            result.Add(CXML.MakeFacetCategory(FilmMetadataFacets.FACET_L2_DUBBED_LANGUAGES, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(FilmMetadataFacets.FACET_L2_SUBTITLED_LANGUAGES, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            //Linked Data: Calculatable from Conversations//

            result.Add(CXML.MakeFacetCategory(FilmMetadataFacets.FACET_CONVERSATION_COUNT, CXML.VALUE_NUMBER, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: false));

            //Common metadata (footer)//

            TrafilmMetadataFacets.GetCXMLFacetCategories_Footer(result);

            return(result);
        }
Пример #18
0
 public CApplicationMessage SendReport(string ClientKey, string inputValue)
 {
     try
     {
         inputValue = CXML.HtmlDecode(inputValue);
         byte[] reportContent        = GetReportPdf(inputValue);
         CApplicationMessage message = SendReportViaEmail(inputValue, reportContent, "", null);
         return(message);
     }
     catch (Exception ex)
     {
         return(new CApplicationMessage()
         {
             Result = 0, Name = ex.Message, Description = ex.Message, Code = "ERROR"
         });
     }
 }
Пример #19
0
        private CApplicationMessage ExportAndSendGCN_TBGT(string ClientKey, string inputValue)
        {
            byte[] attachmentContent  = null;
            string attachmentFileName = "";

            byte[] reportContent = GetReportPdf(inputValue);
            //Lay TBGT
            List <CTransactions> transactions = GetAllAvailableTBGTPdf(ClientKey, inputValue);

            //Zip file
            List <byte[]> zipList = ZipFiels(transactions);


            string KHEmail = CXML.GetXmlNodeValue(inputValue, "RequestParams/@Email");

            string localInputValue = string.Format("<RequestParams Email=\"{0}\" Context=\"{1}\" />", KHEmail, "KHACHHANG_GCN");


            //attachmentFileName danh cho file scan yeu cau, nhung chua duoc duyet nen chuyen qua cho tbgt
            if (zipList != null && zipList.Count > 0)
            {
                attachmentFileName = "TBGT.zip";
                attachmentContent  = zipList[0];
            }
            else
            {
                attachmentFileName = "";
                attachmentContent  = null;
            }
            CApplicationMessage sendResult = SendReportViaEmail(localInputValue, reportContent, attachmentFileName, attachmentContent);

            //neu gui thanh cong thi gui tiep cac tbgt khac (neu co nhieu hon 10 tbgt)
            if (sendResult.IsSuccessfull)
            {
                if (zipList != null && zipList.Count >= 1)
                {
                    for (int i = 1; i < zipList.Count; i++)
                    {
                        attachmentFileName = "TBGT.zip";
                        attachmentContent  = zipList[i];
                        CApplicationMessage result = SendReportViaEmail(localInputValue, null, attachmentFileName, attachmentContent);
                    }
                }
            }
            return(sendResult);
        }
Пример #20
0
        /// <summary>
        /// Lay file Report de gui email
        /// Dua theo RefType
        /// 22: TBGT
        /// 28: Phan hoi
        /// </summary>
        /// <param name="inputValue"></param>
        /// <returns></returns>
        private byte[] GetReportPdf(string inputValue)
        {
            string localInputValue = "<Root>" + inputValue + "</Root>";
            int    UserID          = 0;

            int.TryParse(CXML.GetXmlNodeValue(localInputValue, "Root/InputValue/@UserID"), out UserID);
            string  Session = CXML.GetXmlNodeValue(localInputValue, "Root/InputValue/Session");
            CReport report  = CServiceReference.ServiceReport.GetReport(UserID, Session, 0, inputValue, "PDF");


            if (report.Content == null || report.Content.Length == 0)
            {
                throw new Exception("Lỗi xuất báo cáo: " + report.Description);
            }
            return(report.Content);
            //return null;
        }
Пример #21
0
        public static IEnumerable <XElement> MakeImageFacetCategories() //the following also defines the order in which filters appear in PivotViewer's filter pane
        {
            IList <XElement> result = new List <XElement>();

            result.Add(CXML.MakeFacetCategory(ClipFlairMetadataFacets.FACET_FILENAME, CXML.VALUE_STRING, null, isFilterVisible: false, isMetadataVisible: false, isWordWheelVisible: false));

            result.Add(CXML.MakeFacetCategory(ImageMetadataFacets.FACET_CAPTIONS_LANGUAGE, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            //result.Add(CXML.MakeFacetCategory(ImageMetadataFacets.FACET_GENRE, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            result.Add(MakeAgeGroupFacetCategory());
            result.Add(CXML.MakeFacetCategory(ClipFlairMetadataFacets.FACET_KEYWORDS, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(ClipFlairMetadataFacets.FACET_AUTHORS_SOURCE, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));
            result.Add(CXML.MakeFacetCategory(ClipFlairMetadataFacets.FACET_LICENSE, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            result.Add(CXML.MakeFacetCategory(ClipFlairMetadataFacets.FACET_FIRST_PUBLISHED, CXML.VALUE_DATETIME, CXML.DEFAULT_DATETIME_FORMAT, isFilterVisible: false, isMetadataVisible: true, isWordWheelVisible: false));
            result.Add(CXML.MakeFacetCategory(ClipFlairMetadataFacets.FACET_LAST_UPDATED, CXML.VALUE_DATETIME, CXML.DEFAULT_DATETIME_FORMAT, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: false));

            return(result);
        }
Пример #22
0
        public override IEnumerable <XElement> GetCXMLFacets(IList <XElement> facets = null)
        {
            if (facets == null)
            {
                facets = new List <XElement>();
            }

            //Common metadata//

            base.GetCXMLFacets(facets);

            //Film metadata//

            AddNonNullToList(facets, CXML.MakeStringFacet(FilmMetadataFacets.FACET_FILM_OR_SEASON_TITLE, FilmOrSeasonTitle));

            AddNonNullToList(facets, CXML.MakeStringFacet(FilmMetadataFacets.FACET_TYPE, Type));

            AddNonNullToList(facets, CXML.MakeNumberFacet(FilmMetadataFacets.FACET_DURATION, Duration));

            AddNonNullToList(facets, CXML.MakeStringFacet(FilmMetadataFacets.FACET_SERIES, Series));

            AddNonNullToList(facets, CXML.MakeStringFacet(FilmMetadataFacets.FACET_DIRECTORS, Directors));
            AddNonNullToList(facets, CXML.MakeStringFacet(FilmMetadataFacets.FACET_SCRIPTWRITERS, Scriptwriters));

            AddNonNullToList(facets, CXML.MakeStringFacet(FilmMetadataFacets.FACET_PRODUCTION_COUNTRIES, ProductionCountries));
            AddNonNullToList(facets, CXML.MakeStringFacet(FilmMetadataFacets.FACET_PRODUCTION_COMPANIES, ProductionCompanies));

            AddNonNullToList(facets, CXML.MakeStringFacet(FilmMetadataFacets.FACET_BLOCKBUSTER, Blockbuster));
            AddNonNullToList(facets, CXML.MakeNumberFacet(FilmMetadataFacets.FACET_YEAR_ST_RELEASED, YearSTreleased));

            AddNonNullToList(facets, CXML.MakeStringFacet(FilmMetadataFacets.FACET_L1_LANGUAGE, L1language));

            //Linked Data: Calculatable from Conversations.L3STinstances.L3TTinstances//

            AddNonNullToList(facets, CXML.MakeStringFacet(FilmMetadataFacets.FACET_L2_DUBBED_LANGUAGES, L2dubbedLanguages));
            AddNonNullToList(facets, CXML.MakeStringFacet(FilmMetadataFacets.FACET_L2_SUBTITLED_LANGUAGES, L2subtitledLanguages));

            //Linked Data: Calculatable from Conversations//

            AddNonNullToList(facets, CXML.MakeNumberFacet(FilmMetadataFacets.FACET_CONVERSATION_COUNT, ConversationCount));

            return(facets);
        }
Пример #23
0
        public override IEnumerable <XElement> GetCXMLFacets()
        {
            IList <XElement> facets = new List <XElement>();

            AddNonNullToList(facets, CXML.MakeStringFacet(ClipFlairMetadataFacets.FACET_FILENAME, Filename));

            AddNonNullToList(facets, CXML.MakeStringFacet(ImageMetadataFacets.FACET_CAPTIONS_LANGUAGE, CaptionsLanguage));
            //AddNonNullToList(facets, CXML.MakeStringFacet(ImageMetadataFacets.FACET_GENRE, Genre));

            AddNonNullToList(facets, CXML.MakeStringFacet(ClipFlairMetadataFacets.FACET_AGE_GROUP, AgeGroup));
            AddNonNullToList(facets, CXML.MakeStringFacet(ClipFlairMetadataFacets.FACET_KEYWORDS, Keywords));
            AddNonNullToList(facets, CXML.MakeStringFacet(ClipFlairMetadataFacets.FACET_AUTHORS_SOURCE, AuthorSource));
            AddNonNullToList(facets, CXML.MakeStringFacet(ClipFlairMetadataFacets.FACET_LICENSE, License));

            AddNonNullToList(facets, CXML.MakeDateTimeFacet(ClipFlairMetadataFacets.FACET_FIRST_PUBLISHED, FirstPublished));
            AddNonNullToList(facets, CXML.MakeDateTimeFacet(ClipFlairMetadataFacets.FACET_LAST_UPDATED, LastUpdated));

            return(facets);
        }
Пример #24
0
        public static IEnumerable <XElement> GetCXMLFacetCategories(IList <XElement> result = null) //the following also defines the order in which filters appear in PivotViewer's filter pane
        {
            if (result == null)
            {
                result = new List <XElement>();
            }

            //Common metadata (header)//

            TrafilmMetadataFacets.GetCXMLFacetCategories_Header(result);

            //Conversation metadata//

            result.Add(CXML.MakeFacetCategory(ConversationMetadataFacets.FACET_FILM_OR_SEASON_TITLE, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true)); //Calculatable from Film
            result.Add(CXML.MakeFacetCategory(ConversationMetadataFacets.FACET_SEASON_EPISODE_NAME, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            result.Add(CXML.MakeFacetCategory(ConversationMetadataFacets.FACET_START_TIME, CXML.VALUE_NUMBER, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: false));
            result.Add(CXML.MakeFacetCategory(ConversationMetadataFacets.FACET_DURATION, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: false));

            //result.Add(CXML.MakeFacetCategory(ConversationMetadataFacets.FACET_LANGUAGE_SOURCES, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true)); //NOT USED

            //Linked Data: Calculatable from L3STinstances//

            result.Add(CXML.MakeFacetCategory(ConversationMetadataFacets.FACET_L3ST_LANGUAGES_COUNT, CXML.VALUE_NUMBER, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: false));
            result.Add(CXML.MakeFacetCategory(ConversationMetadataFacets.FACET_L3ST_LANGUAGES, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            result.Add(CXML.MakeFacetCategory(ConversationMetadataFacets.FACET_L3ST_LANGUAGE_TYPES_COUNT, CXML.VALUE_NUMBER, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: false));
            result.Add(CXML.MakeFacetCategory(ConversationMetadataFacets.FACET_L3ST_LANGUAGE_TYPES, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            result.Add(CXML.MakeFacetCategory(ConversationMetadataFacets.FACET_L3ST_INSTANCE_COUNT, CXML.VALUE_NUMBER, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: false));

            //Common metadata (footer)//

            TrafilmMetadataFacets.GetCXMLFacetCategories_Footer(result);

            //Linked Data: References//

            result.Add(CXML.MakeFacetCategory(ConversationMetadataFacets.FACET_FILM_REFERENCE_ID, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            return(result);
        }
Пример #25
0
        public static IEnumerable <XElement> GetCXMLFacetCategories_Footer(IList <XElement> result = null) //the following also defines the order in which filters appear in PivotViewer's filter pane
        {
            if (result == null)
            {
                result = new List <XElement>();
            }

            result.Add(CXML.MakeFacetCategory(TrafilmMetadataFacets.FACET_TRANSCRIPTION, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            result.Add(CXML.MakeFacetCategory(TrafilmMetadataFacets.FACET_TAGS, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            result.Add(CXML.MakeFacetCategory(TrafilmMetadataFacets.FACET_REMARKS, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            result.Add(CXML.MakeFacetCategory(TrafilmMetadataFacets.FACET_INFO_CREATED, CXML.VALUE_DATETIME, CXML.DEFAULT_DATETIME_FORMAT, isFilterVisible: false, isMetadataVisible: true, isWordWheelVisible: false));
            result.Add(CXML.MakeFacetCategory(TrafilmMetadataFacets.FACET_INFO_UPDATED, CXML.VALUE_DATETIME, CXML.DEFAULT_DATETIME_FORMAT, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: false));

            result.Add(CXML.MakeFacetCategory(TrafilmMetadataFacets.FACET_METADATA_EDITORS, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            result.Add(CXML.MakeFacetCategory(TrafilmMetadataFacets.FACET_REFERENCE_ID, CXML.VALUE_STRING, null, isFilterVisible: true, isMetadataVisible: true, isWordWheelVisible: true));

            return(result);
        }
Пример #26
0
        public virtual IEnumerable <XElement> GetCXMLFacets(IList <XElement> facets = null)
        {
            if (facets == null)
            {
                facets = new List <XElement>();
            }

            AddNonNullToList(facets, CXML.MakeStringFacet(TrafilmMetadataFacets.FACET_REFERENCE_ID, ReferenceId));

            AddNonNullToList(facets, CXML.MakeStringFacet(TrafilmMetadataFacets.FACET_TRANSCRIPTION, Transcription));

            AddNonNullToList(facets, CXML.MakeStringFacet(TrafilmMetadataFacets.FACET_TAGS, Tags));

            AddNonNullToList(facets, CXML.MakeStringFacet(TrafilmMetadataFacets.FACET_REMARKS, Remarks));

            AddNonNullToList(facets, CXML.MakeDateTimeFacet(TrafilmMetadataFacets.FACET_INFO_CREATED, InfoCreated));
            AddNonNullToList(facets, CXML.MakeDateTimeFacet(TrafilmMetadataFacets.FACET_INFO_UPDATED, InfoUpdated));

            AddNonNullToList(facets, CXML.MakeStringFacet(TrafilmMetadataFacets.FACET_METADATA_EDITORS, MetadataEditors));

            return(facets);
        }
Пример #27
0
        private List <CTransactions> GetAllAvailableTBGTPdf(string clientKey, string inputValue)
        {
            //lay ra danh sach TBGT đã có
            //Tách danh sách này ra 10 TBGT cho 1 file để gửi trong 1 email

            string authenticateInput = CXML.Query(inputValue, "/InputValue");
            string regisTransRefID   = CXML.GetXmlNodeValue(inputValue, "/RequestParams/@ID");

            //Lay danh sach
            string getTBGTList = "<RequestParams Function=\"GetTransaction_Asset\" RefType=\"22\" RegisTransRefID=\"{0}\"/>";

            getTBGTList = string.Format(getTBGTList, regisTransRefID);

            string actionResult = new FWS.VnAccounting.Service.Data.Core.Class.CCoreService().GetContextData(clientKey, getTBGTList);
            List <CTransactions> transactions = CDataParser.FromCSV <CTransactions>(actionResult, 1);

            if (transactions == null)
            {
                return(null);
            }
            for (int i = transactions.Count - 1; i >= 0; i--)
            {
                if (transactions[i].Level != 0 && transactions[i].Level != 1)
                {
                    transactions.Remove(transactions[i]);
                }
            }

            foreach (var trans in transactions)
            {
                string reportContext    = trans.Level == 0 ? "SPLIT" : "COMBINE";
                string reportInputValue = string.Format("<RequestParams ID=\"{0}\" Context=\"{3}\" RefNo=\"{1}\" RegisTransRefNo=\"{2}\" ViewerID=\"13\" IncludeSign=\"1\"/>", trans.ID, trans.RefNo, trans.RegisTransRefNo, reportContext);
                byte[] reportContent    = GetReportPdf(reportInputValue);
                trans.ReportContent = reportContent;
            }

            return(transactions);
        }
Пример #28
0
        public override IEnumerable <XElement> GetCXMLFacets()
        {
            IList <XElement> facets = new List <XElement>();

            AddNonNullToList(facets, CXML.MakeStringFacet(ClipFlairMetadataFacets.FACET_FILENAME, Filename));

            AddNonNullToList(facets, CXML.MakeStringFacet(VideoMetadataFacets.FACET_AUDIO_LANGUAGE, AudioLanguage));
            AddNonNullToList(facets, CXML.MakeStringFacet(VideoMetadataFacets.FACET_CAPTIONS_LANGUAGE, CaptionsLanguage));
            AddNonNullToList(facets, CXML.MakeStringFacet(VideoMetadataFacets.FACET_GENRE, Genre));
            AddNonNullToList(facets, CXML.MakeStringFacet(VideoMetadataFacets.FACET_DURATION, Duration));
            AddNonNullToList(facets, CXML.MakeStringFacet(VideoMetadataFacets.FACET_AUDIOVISUAL_RICHNESS, AudiovisualRichness));
            AddNonNullToList(facets, CXML.MakeStringFacet(VideoMetadataFacets.FACET_PEDAGOGICAL_ADAPTABILITY, PedagogicalAdaptability.ToString())); //this will give True/False (not Yes/No)

            AddNonNullToList(facets, CXML.MakeStringFacet(ClipFlairMetadataFacets.FACET_AGE_GROUP, AgeGroup));
            AddNonNullToList(facets, CXML.MakeStringFacet(ClipFlairMetadataFacets.FACET_KEYWORDS, Keywords));
            AddNonNullToList(facets, CXML.MakeStringFacet(ClipFlairMetadataFacets.FACET_AUTHORS_SOURCE, AuthorSource));
            AddNonNullToList(facets, CXML.MakeStringFacet(ClipFlairMetadataFacets.FACET_LICENSE, License));

            AddNonNullToList(facets, CXML.MakeDateTimeFacet(ClipFlairMetadataFacets.FACET_FIRST_PUBLISHED, FirstPublished));
            AddNonNullToList(facets, CXML.MakeDateTimeFacet(ClipFlairMetadataFacets.FACET_LAST_UPDATED, LastUpdated));

            return(facets);
        }
Пример #29
0
        public bool UpdateTransaction()
        {
            UpdateSoDonNhan();

            CurrentTransaction.ReceiveDateTime    = GetReceiveDateTime();// txtReceiveDateTime.Value;
            CurrentTransaction.NumPagesAttachment = (int)txtNumPagesAttachment.Value;
            //CurrentTransaction.AssetIDCardNo = txtIDNo.Text;
            CurrentTransaction.AssetPersonalCode = txtPersonalCode.Text;

            string       requestparams = CurrentTransaction.GetRequestParams("Function='Transaction_Asset' Action='UPDATEGCN'");
            CCoreService service       = new CCoreService();

            requestparams = CXML.AddAuthenticate(requestparams);
            string messageCSV = service.ExecuteAction(CSession.CLIENT_KEY, CXML.HtmlEnCode(requestparams));
            IList <FWS.TTDKGDTS.ImportTool.BusinessObject.CApplicationMessage> message = CObjectMapper.FromCSV <FWS.TTDKGDTS.ImportTool.BusinessObject.CApplicationMessage>(messageCSV, 1);

            if (message[0].Result == null || message[0].Result.ToString() == "" || message[0].Result.ToString() == "0")
            {
                MessageBox.Show(message[0].Description);
                return(false);
            }
            return(true);
        }
        public override IEnumerable <XElement> GetCXMLFacets(IList <XElement> facets = null)
        {
            if (facets == null)
            {
                facets = new List <XElement>();
            }

            //Common metadata//

            base.GetCXMLFacets(facets);

            //Conversation metadata//

            AddNonNullToList(facets, CXML.MakeStringFacet(ConversationMetadataFacets.FACET_FILM_OR_SEASON_TITLE, FilmOrSeasonTitle));
            AddNonNullToList(facets, CXML.MakeStringFacet(ConversationMetadataFacets.FACET_SEASON_EPISODE_NAME, SeasonEpisodeName));

            AddNonNullToList(facets, CXML.MakeNumberFacet(ConversationMetadataFacets.FACET_START_TIME, StartTime));
            AddNonNullToList(facets, CXML.MakeStringFacet(ConversationMetadataFacets.FACET_DURATION, Duration));

            //AddNonNullToList(facets, CXML.MakeStringFacet(ConversationMetadataFacets.FACET_LANGUAGE_SOURCES, LanguageSources)); //(NOT USED)

            //Linked Data: Calculatable from L3STinstances//

            AddNonNullToList(facets, CXML.MakeNumberFacet(ConversationMetadataFacets.FACET_L3ST_LANGUAGES_COUNT, L3STlanguagesCount));
            AddNonNullToList(facets, CXML.MakeStringFacet(ConversationMetadataFacets.FACET_L3ST_LANGUAGES, L3STlanguages));

            AddNonNullToList(facets, CXML.MakeNumberFacet(ConversationMetadataFacets.FACET_L3ST_LANGUAGE_TYPES_COUNT, L3STlanguageTypesCount));
            AddNonNullToList(facets, CXML.MakeStringFacet(ConversationMetadataFacets.FACET_L3ST_LANGUAGE_TYPES, L3STlanguageTypes));

            AddNonNullToList(facets, CXML.MakeNumberFacet(ConversationMetadataFacets.FACET_L3ST_INSTANCE_COUNT, L3STinstanceCount));

            //Linked Data: References//

            AddNonNullToList(facets, CXML.MakeStringFacet(ConversationMetadataFacets.FACET_FILM_REFERENCE_ID, FilmReferenceId));

            return(facets);
        }