Ejemplo n.º 1
0
 public static bool UpdateAmfiDB(string portalid, MainStructure tenderdb)
 {
     MainStructure tenderdbclone;
     tenderdbclone = (MainStructure)tenderdb.Clone();
     AmfiBorgDBConCurrent.AddOrUpdate(portalid, tenderdbclone, (key, oldValue) => tenderdbclone);
     return true;
 }
Ejemplo n.º 2
0
 public static void SaveAmfiDB(string partnerid, string portalid, MainStructure tenderdb, string reason)
 {
     string folder =  Current.DataFolder();
     string file = folder + "Color" + System.DateTime.Now.ToString(Current.TimeStamp) + "_" + System.Text.RegularExpressions.Regex.Replace(reason, FileRegex, string.Empty) + ".dndata.gz";
     string sXML = Utility.Serialize(tenderdb, true);
     byte[] bXML = Utility.GZIP(ref sXML);
     System.IO.File.WriteAllBytes(file, bXML);
     UpdateAmfiDB(portalid, tenderdb);
 }
Ejemplo n.º 3
0
        public ActionResult Create(ColorInfo color)
        {
            if (ModelState.IsValid)
            {
                mt = mt.Load();
                mt.oColor.Add(color);
                mt.Save("addcolor");
                return RedirectToAction("Index");
            }

            return View(color);
        }
Ejemplo n.º 4
0
        public ActionResult Index()
        {
            ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";
            MainStructure mt = new MainStructure();
            try
            {
                mt.Load();
                mt.oColor.Add(new ColorInfo() { Name = "", Code = "#0094ff;" });
                mt.oColor.Add(new ColorInfo() { Name = "", Code = "#b6ff00;" });
                mt.oColor.Add(new ColorInfo() { Name = "", Code = "#b6ff00;" });
                mt.oColor.Add(new ColorInfo() { Name = "", Code = "#08bdf8;" });
                mt.oColor.Add(new ColorInfo() { Name = "", Code = "#f3bf18;" });
                mt.oColor.Add(new ColorInfo() { Name = "", Code = "#f784d8;" });
                mt.oColor.Add(new ColorInfo() { Name = "", Code = "#08bdf8;" });
                ViewBag.conme = Current.DataFolder();
                mt.Save("add colors");
            }
            catch(Exception ex) {
                ViewBag.errorms = ex.Message;
            }

            return View();
        }
Ejemplo n.º 5
0
 public object Clone()
 {
     MainStructure o = new MainStructure();
     o.a = this.a;
     o.name = this.name;
     o.oColor = this.oColor;
     return o;
 }
Ejemplo n.º 6
0
 public ActionResult Index()
 {
     mt=mt.Load();
     return View(mt.oColor);
 }