Example #1
0
        public bool GetlistContentTable(ref List <EBContentTable> oldTableList)
        {
            try
            {
                oldTableList.Clear();
                foreach (EBContent_AllData item in EBContent_List_AllData)
                {
                    EBContentTable pp = new EBContentTable();
                    pp.ProtocolGX = SingletonInfo.GetInstance().IsProtocolGX;
                    List <MultilangualContent> listMulti = GetSendMultilangualContentNew(item.EBContentList);
                    if (listMulti == null || listMulti.Count == 0)
                    {
                        // return false;
                        continue;
                    }
                    pp.list_multilangual_content = listMulti;
                    pp.S_EBM_id           = item.EBM_ID;
                    pp.Repeat_times       = pnlRepeatTimes.GetRepeatTimes();
                    pp.Table_id           = 0xfe;
                    pp.Table_id_extension = 0;

                    oldTableList.Add(pp);
                }
                return(true);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message + ex.StackTrace);
                return(false);
            }
        }
Example #2
0
 public bool GetContentTable(ref EBContentTable oldTable)
 {
     try
     {
         List <MultilangualContent> listMulti = GetSendMultilangualContent();
         if (listMulti == null || listMulti.Count == 0)
         {
             oldTable.list_multilangual_content.Clear();
             return(false);
         }
         if (oldTable == null)
         {
             oldTable                    = new EBContentTable();
             oldTable.Table_id           = 0xfe;
             oldTable.Table_id_extension = 0;
         }
         oldTable.list_multilangual_content = listMulti;
         oldTable.S_EBM_id     = cbBoxEBMId.Text;
         oldTable.Repeat_times = pnlRepeatTimes.GetRepeatTimes();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Example #3
0
 public bool GetContentTable(ref EBContentTable oldTable)
 {
     try
     {
         List <MultilangualContent> listMulti = GetSendMultilangualContent();
         if (listMulti == null || listMulti.Count == 0)
         {
             oldTable.list_multilangual_content.Clear();
             return(false);
         }
         //if (oldTable == null)
         //{
         //    oldTable = new EBContentTable();
         //    oldTable.Table_id = 0xfe;
         //    oldTable.Table_id_extension = 0;
         //}
         oldTable.list_multilangual_content = listMulti;
         oldTable.S_EBM_id     = cbBoxEBMId.Text;
         oldTable.Repeat_times = pnlRepeatTimes.GetRepeatTimes();
         return(true);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message + ex.StackTrace);
         return(false);
     }
 }