Exemple #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        #region Tab Pages
        //if (!NewMode)
        //     ShowDetails();
        //else
        //{
        //     RadMultiPage1.SelectedIndex = 0;
        //     tsNotes.Tabs[0].Selected = true;
        //}
        #endregion
        BOLClass        = new BOLNotes();
        lblSysName.Text = BOLClass.PageLable;

        if ((Code == null) && (!NewMode))
        {
            return;
        }
        if (!Page.IsPostBack)
        {
            //if (!NewMode) ShowDetails();

            #region Fill Combo

            #endregion
            if (!NewMode)
            {
                LoadData((int)Code);
            }
            else
            {
                dteSubjectDate.SelectedDateChristian = DateTime.Now;
            }
        }
    }
Exemple #2
0
    protected void DoSave(object sender, ImageClickEventArgs e)
    {
        try
        {
            int ReturnCode = SaveControls("~/Main/Default.aspx?BaseID=" + BaseID);
            if (NewMode && ReturnCode != -1)
            {
                NewMode = false;
                Code    = ReturnCode;
                ShowDetails();
            }

            BOLNotes NotesBOL      = new BOLNotes();
            Notes    CurMultiMedia = NotesBOL.GetDetails((int)Code);

            if (uplLargePicFile.UploadedFiles.Count > 0 || string.IsNullOrEmpty(CurMultiMedia.PicFile))
            {
                Guid   newGd        = Guid.NewGuid();
                string RandSmallPic = newGd.ToString().Replace("-", "") + ".jpg";

                DateTime thisTime = DateTime.Now;
                string   UplPath  = "~/Files/MultiMedias/";

                SavePic(CurMultiMedia.LargePicFile, RandSmallPic, HttpContext.Current.Request.MapPath(UplPath), 220);
                NotesBOL.ChangeSmallPic(ReturnCode, UplPath + "/" + RandSmallPic);
            }
        }
        catch
        {
        }
    }
Exemple #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string strPageNo = Request["PageNo"];

            Int32.TryParse(strPageNo, out PageNo);
            if (PageNo == 0)
            {
                PageNo = 1;
            }

            if (!Page.IsPostBack)
            {
                BOLNotes NotesBOL = new BOLNotes();
                rptItems.DataSource = NotesBOL.GetList(PageNo, PageSize);
                rptItems.DataBind();

                int ResultCount = NotesBOL.GetListCount();
                int PageCount   = (int)ResultCount / PageSize;
                if (ResultCount % PageSize > 0)
                {
                    PageCount++;
                }

                ConcatUrl           += "";
                pgrToolbar.PageNo    = PageNo;
                pgrToolbar.PageCount = PageCount;
                pgrToolbar.ConcatUrl = ConcatUrl;
                pgrToolbar.PageBind();
            }
        }
Exemple #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BOLNotes NotesBOL   = new BOLNotes();
            vNotes   LatestItem = NotesBOL.GetLatestRecord();

            if (LatestItem != null)
            {
                lblTitle.Text           = LatestItem.Title;
                lblDescription.Text     = Tools.FormatString(LatestItem.Description);
                imgPic.ImageUrl         = "~/" + LatestItem.PicFile;
                hplLargePic.NavigateUrl = "~/" + LatestItem.LargePicFile;
            }
        }