public object DeleteSection([FromBody] SectionParam SectionParam)
        {
            SectionMasterBussiness Delete = new SectionMasterBussiness();
            var result = Delete.DeleteSection(SectionParam);

            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Writes the XML file for getting infos about updates.
        /// </summary>
        /// <param name="xmlFile">is the filename where to save the infos to.</param>
        public bool WriteUpdateXml(string xmlFile)
        {
            if (String.IsNullOrEmpty(xmlFile))
            {
                Console.WriteLine("[MpeMaker] Error: Output file for Update.xml is not specified in package.");
                return(false);
            }

            if (!Path.IsPathRooted(xmlFile))
            {
                xmlFile = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(this.ProjectSettings.ProjectFilename), xmlFile));
            }

            ExtensionCollection list = ExtensionCollection.Load(xmlFile);

            PackageClass pakToAdd = this;

            pakToAdd.GeneralInfo.OnlineLocation = ReplaceInfo(pakToAdd.GeneralInfo.OnlineLocation);

            SectionParam iconParam = pakToAdd.GeneralInfo.Params[ParamNamesConst.ICON];

            pakToAdd.GeneralInfo.Params.Items.Remove(pakToAdd.GeneralInfo.Params[ParamNamesConst.ICON]);

            list.Add(pakToAdd);

            list.Save(xmlFile);

            pakToAdd.GeneralInfo.Params.Items.Insert(0, iconParam);

            return(true);
        }
        public object DisplaySection([FromBody] SectionParam SectionParam)
        {
            SectionMasterBussiness Display = new SectionMasterBussiness();
            var result = Display.DisplaySection(SectionParam);

            return(result);
        }
        public object UpdateSection([FromBody] SectionParam SectionParam)
        {
            SectionMasterBussiness Update = new SectionMasterBussiness();
            var result = Update.UpdateSection(SectionParam);

            return(result);
        }
        public object AddSection([FromBody] SectionParam SectionParam)
        {
            SectionMasterBussiness Add = new SectionMasterBussiness();

            var result = Add.SaveSection(SectionParam);

            return(result);
        }
Ejemplo n.º 6
0
 private void cmb_params_SelectedIndexChanged(object sender, EventArgs e)
 {
     SelectedItem = cmb_params.SelectedItem as SectionParam;
     panel1.Controls.Clear();
     Panels[SelectedItem.ValueType].Set(SelectedItem);
     panel1.Controls.Add((Control)Panels[SelectedItem.ValueType]);
     label_desc.Text = SelectedItem.Description;
 }
Ejemplo n.º 7
0
        public object SingleSection(SectionParam objParam)
        {
            var SingleRecord = db.Tbl_Section_Master.SingleOrDefault(r => r.SectionId == objParam.Sectionid);

            return(new Result()
            {
                IsSucess = true, ResultData = SingleRecord
            });
        }
 public void Set(SectionParam param)
 {
     Param = param;
     if (Param.GetValueAsBool())
     {
         radio_Yes.Checked = true;
     }
     else
     {
         radio_No.Checked = true;
     }
 }
Ejemplo n.º 9
0
        public object UpdateSection(SectionParam objParam)
        {
            Tbl_Section_Master obj = db.Tbl_Section_Master.SingleOrDefault(r => r.SectionId == objParam.Sectionid);

            obj.SectionName  = objParam.SectionName;
            obj.ModifiedBy   = 1;
            obj.ModifiedDate = DateTime.Now;
            db.SaveChanges();
            return(new Result()
            {
                IsSucess = true, ResultData = "Record Updated Successfully"
            });
        }
Ejemplo n.º 10
0
        public object DisplaySection(SectionParam objParam)
        {
            List <View_SectionDisplay> DisplayResult = null;

            if (objParam.Status == 1)
            {
                DisplayResult = db.View_SectionDisplay.Where(r => r.Status == 1).ToList();
            }
            else
            {
                DisplayResult = db.View_SectionDisplay.Where(r => r.Status == 0).ToList();
            }
            return(DisplayResult);
        }
Ejemplo n.º 11
0
    public static void PlayHomeBGM()
    {
        if (Object.op_Inequality((Object)MonoSingleton <GameManager> .GetInstanceDirect(), (Object)null))
        {
            SectionParam currentSectionParam = MonoSingleton <GameManager> .Instance.GetCurrentSectionParam();

            string cueID = currentSectionParam != null ? currentSectionParam.bgm : (string)null;
            if (!string.IsNullOrEmpty(cueID))
            {
                MonoSingleton <MySound> .Instance.PlayBGM(cueID, (string)null);

                return;
            }
        }
        MonoSingleton <MySound> .Instance.PlayBGM("BGM_0027", (string)null);
    }
Ejemplo n.º 12
0
        public object SaveSection(SectionParam objParam)
        {
            Tbl_Section_Master obj = new Tbl_Section_Master();

            obj.SectionName  = objParam.SectionName;
            obj.Status       = 1;
            obj.CreatedBy    = 1;
            obj.CreatedDate  = DateTime.Now;
            obj.ModifiedBy   = null;
            obj.ModifiedDate = null;
            db.Tbl_Section_Master.Add(obj);
            db.SaveChanges();
            return(new Result()
            {
                IsSucess = true, ResultData = "Section Save Successfully"
            });
        }
Ejemplo n.º 13
0
        public object UpdateSection(SectionParam objParam)
        {
            var Data = db.Tbl_Section_Master.Where(r => r.SectionName == objParam.SectionName).FirstOrDefault();

            if (Data == null)
            {
                return(new Error()
                {
                    IsError = true, Message = "Duplicate Entry Not Allowed"
                });
            }
            Tbl_Section_Master obj = db.Tbl_Section_Master.SingleOrDefault(r => r.SectionId == objParam.Sectionid);

            obj.SectionName  = objParam.SectionName;
            obj.ModifiedBy   = 1;
            obj.ModifiedDate = DateTime.Now;
            db.SaveChanges();
            return(new Result()
            {
                IsSucess = true, ResultData = "Record Updated Successfully"
            });
        }
Ejemplo n.º 14
0
 public object DeleteSection(SectionParam objParam)
 {
     if (objParam.Status == 1)
     {
         Tbl_Section_Master obj = db.Tbl_Section_Master.SingleOrDefault(r => r.SectionId == objParam.Sectionid && r.Status == 1);
         obj.Status = 0;
         db.SaveChanges();
         return(new Result()
         {
             IsSucess = true, ResultData = "Record Deactivated Successfully"
         });
     }
     else
     {
         Tbl_Section_Master obj = db.Tbl_Section_Master.SingleOrDefault(r => r.SectionId == objParam.Sectionid && r.Status == 0);
         obj.Status = 1;
         db.SaveChanges();
         return(new Result()
         {
             IsSucess = true, ResultData = "Record Activated Successfully"
         });
     }
 }
Ejemplo n.º 15
0
 public UIQuestSectionData(SectionParam param)
 {
     this.mParam = param;
 }
 public void Set(SectionParam param)
 {
     Param = param;
 }
Ejemplo n.º 17
0
 public void Set(SectionParam param)
 {
     Param         = param;
     textBox1.Text = param.Value;
 }
Ejemplo n.º 18
0
 public void Set(SectionParam param)
 {
     Param         = param;
     txt_file.Text = param.Value;
 }