예제 #1
0
        // GET: AnaSayfa
        public ActionResult Index()
        {
            homeModels      home        = new homeModels();
            howIsWorkModel  how         = new howIsWorkModel();
            bannerModels    bannerModel = new bannerModels();
            siteInformation site        = _site.getOne(settings.siteInformation);
            List <banner>   banner      = _banner.getAll();
            usingArea       area        = _usingArea.getOne(settings.usingArea);
            whatIsAdvantage advantage   = advantageBll.getOne(settings.avantageId);
            validity        service     = _service.getOne(settings.service);
            talkTableTeam   member      = _member.getOne(settings.talkTableTeam);
            howIsWork       howIsWork   = _how.getOne(settings.how);

            bannerModel.banners = banner;
            bannerModel.site    = site;

            how.site      = site;
            how.HowIsWork = howIsWork;

            home.how       = howIsWork;
            home.banner    = bannerModel;
            home.site      = site;
            home.area      = area;
            home.advantage = advantage;
            home.service   = service;
            home.team      = member;
            return(View(home));
        }
예제 #2
0
        public ActionResult servisGuncelle(validity validity, HttpPostedFileBase file)
        {
            if (ModelState.IsValid)
            {
                validity changeValidity = _service.getOne(validity.id);
                if (changeValidity != null)
                {
                    if (file != null)
                    {
                        if (System.IO.File.Exists(Server.MapPath(changeValidity.validityPicturePath)))
                        {
                            System.IO.File.Delete(Server.MapPath(changeValidity.validityPicturePath));
                        }
                        int    picWidth   = settings.bannerSize.Width;
                        int    pichHeight = settings.bannerSize.Height;
                        string newName    = "";
                        if (file.FileName.Length > 10)
                        {
                            newName = Path.GetFileNameWithoutExtension(file.FileName.Substring(0, 10)) + Guid.NewGuid() + Path.GetExtension(file.FileName);
                        }
                        else
                        {
                            newName = Path.GetFileNameWithoutExtension(file.FileName) + "-" + Guid.NewGuid() + Path.GetExtension(file.FileName);
                        }
                        Image  orjResim    = Image.FromStream(file.InputStream);
                        Bitmap pictureDraw = new Bitmap(orjResim, picWidth, pichHeight);
                        if (Directory.Exists(Server.MapPath("/images/serviceBackground")))
                        {
                            pictureDraw.Save(Server.MapPath("/images/serviceBackground/" + newName));
                        }


                        changeValidity.validityPicturePath = "/images/serviceBackground/" + newName;
                        changeValidity.pictureAlt          = file.FileName;
                    }
                    changeValidity.caption  = validity.caption;
                    changeValidity.infoText = validity.infoText;
                    _service.update(changeValidity);
                    return(RedirectToAction("index", new { area = "AdminPanel" }));
                }
                else
                {
                    return(View("index", validity));
                }
            }
            else
            {
                return(View("index", validity));
            }
        }
예제 #3
0
 public tbsCertificate(asn1.RawContent Raw = default, long Version = default, ref ptr <big.Int> SerialNumber = default, pkix.AlgorithmIdentifier SignatureAlgorithm = default, asn1.RawValue Issuer = default, validity Validity = default, asn1.RawValue Subject = default, publicKeyInfo PublicKey = default, asn1.BitString UniqueId = default, asn1.BitString SubjectUniqueId = default, slice <pkix.Extension> Extensions = default)
 {
     this.Raw                = Raw;
     this.Version            = Version;
     this.SerialNumber       = SerialNumber;
     this.SignatureAlgorithm = SignatureAlgorithm;
     this.Issuer             = Issuer;
     this.Validity           = Validity;
     this.Subject            = Subject;
     this.PublicKey          = PublicKey;
     this.UniqueId           = UniqueId;
     this.SubjectUniqueId    = SubjectUniqueId;
     this.Extensions         = Extensions;
 }
예제 #4
0
 public bool update(validity validity)
 {
     return(_validityDal.Update(validity));
 }
예제 #5
0
 public bool delete(validity validity)
 {
     return(_validityDal.Delete(validity));
 }
예제 #6
0
 public bool add(validity validity)
 {
     return(_validityDal.Add(validity));
 }