Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                LoadInfoToForm();
            }
            if (flpHokm.UploadedFiles.Count > 0)
            {
                UploadedFile obj = flpHokm.UploadedFiles[0];
                string       ScanMadarekURL;
                if (!Directory.Exists(Server.MapPath("~/University/CooperationRequest/Teachers/ScanMadarek/")))
                {
                    Directory.CreateDirectory(Server.MapPath("~/University/CooperationRequest/Teachers/ScanMadarek/"));
                }
                string subPath = Server.MapPath("~/University/CooperationRequest/Teachers/ScanMadarek/") + Session[sessionNames.userID_StudentOstad].ToString() + "\\";

                bool exists = System.IO.Directory.Exists(subPath);

                if (!exists)
                {
                    System.IO.Directory.CreateDirectory(subPath);
                }
                try
                {
                    ScanMadarekURL = subPath + "Hokm" + DateTime.Now.ToPeString("yyyy-MM-dd_HH-mm-ss") + obj.GetName();
                    obj.SaveAs(ScanMadarekURL.improveFileName(), true);
                }
                catch (Exception)
                {
                    throw;
                }
                Session.Add("ScanMadarekURL", ScanMadarekURL);
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int code_ostad = Convert.ToInt32(Session[sessionNames.userID_StudentOstad]);
                if (ProfReqBuss.HasPendingRequest(code_ostad, (int)RequestTypeId.EditHokm))
                {
                    ShowView = false;
                    string msg = "شما به دلیل وجود درخواست تایید نشده از این نوع درخواست نمی توانید درخواست جدید ثبت کنید.";
                    RadWindowManager2.RadAlert(msg, 500, 100, "پیام سیستم", "RedirectToMain");
                    return;
                }
                LoadInfoToForm();
            }
            if (flpHokm.UploadedFiles.Count > 0)
            {
                UploadedFile obj = flpHokm.UploadedFiles[0];
                string       ScanMadarekURL;
                if (!Directory.Exists(Server.MapPath("~/University/CooperationRequest/Teachers/ScanMadarek/")))
                {
                    Directory.CreateDirectory(Server.MapPath("~/University/CooperationRequest/Teachers/ScanMadarek/"));
                }
                string subPath = Server.MapPath("~/University/CooperationRequest/Teachers/ScanMadarek/") + Session[sessionNames.userID_StudentOstad].ToString() + "\\";

                bool exists = System.IO.Directory.Exists(subPath);

                if (!exists)
                {
                    System.IO.Directory.CreateDirectory(subPath);
                }
                try
                {
                    ScanMadarekURL = subPath + "Hokm" + DateTime.Now.ToPeString("yyyy-MM-dd_HH-mm-ss") + obj.GetName();
                    obj.SaveAs(ScanMadarekURL.improveFileName(), true);
                }
                catch (Exception)
                {
                    throw;
                }
                Session.Add("ScanMadarekURL", ScanMadarekURL);
            }
        }