Example #1
0
    protected void PopupWithDocument_WindowCallback(object source, DevExpress.Web.PopupWindowCallbackArgs e)
    {
        String fullFileName = e.Parameter;

        object format = DocumentFormatHelper.GetFormat(fullFileName);

        if (format == null)
        {
            return;
        }

        Boolean isSpreadsheet = format is DevExpress.Spreadsheet.DocumentFormat;

        ASPxSpreadsheet1.Visible = isSpreadsheet;
        ASPxRichEdit1.Visible    = !isSpreadsheet;

        var docId   = Guid.NewGuid().ToString();
        var docPath = Server.MapPath(fullFileName);

        if (isSpreadsheet)
        {
            ASPxSpreadsheet1.Open(docId, (DevExpress.Spreadsheet.DocumentFormat)format, () => File.ReadAllBytes(docPath));
        }
        else
        {
            ASPxRichEdit1.Open(docId, (DevExpress.XtraRichEdit.DocumentFormat)format, () => File.ReadAllBytes(docPath));
        }
    }
 protected void PopupControlUsers_WindowCallback(object source, DevExpress.Web.PopupWindowCallbackArgs e)
 {
     RemoveSession(Enums.CommonSession.UserActionPopUp);
     RemoveSession(Enums.EmployeeSession.EmployeeID);
     RemoveSession(Enums.EmployeeSession.UserID);
     RemoveSession(Enums.EmployeeSession.UserModel);
 }
Example #3
0
        protected void ASPxPopupControl1_WindowCallback(object source, DevExpress.Web.PopupWindowCallbackArgs e)
        {
            string key = e.Parameter;

            Session["ReceiptId"] = key;
            ASPxgvCreditNotes.DataBind();
        }
Example #4
0
        protected void PDFViewerPopup_WindowCallback(object source, DevExpress.Web.PopupWindowCallbackArgs e)
        {
            string id = e.Parameter.ToString();

            PDFViewerPopup.JSProperties["cpCustomerEmployeeID"] = id;// customerEmployee.Id;
            PDFViewerPopup.JSProperties["cpHeaderText"]         = "PDF Doküman Görüntüleme";
        }
Example #5
0
    protected void PopupControl_WindowCallback(object source, DevExpress.Web.PopupWindowCallbackArgs e)
    {
        ASPxPopupControl popup = source as ASPxPopupControl;

        if (!string.IsNullOrEmpty(e.Parameter))
        {
            CreateOrderContent(popup, Int32.Parse(e.Parameter));
        }
    }
    protected void ImagePopupControl_WindowCallback(object source, DevExpress.Web.PopupWindowCallbackArgs e)
    {
        var roomID    = Convert.ToInt32(e.Parameter.Substring(0, e.Parameter.IndexOf("|")));
        var imageName = e.Parameter.Substring(e.Parameter.IndexOf("|") + 1);
        var context   = new HotelBookingDataContextExt();
        var room      = context.Rooms.First(r => r.ID == roomID);

        RoomPopupImageSlider.DataSource = room.Pictures;
        RoomPopupImageSlider.DataBind();
        RoomPopupImageSlider.ActiveItemIndex = RoomPopupImageSlider.Items.IndexOf(isi => ((Picture)isi.DataItem).Picture_Id == imageName);
    }
Example #7
0
        protected void popupToolReturn_WindowCallback(object source, DevExpress.Web.PopupWindowCallbackArgs e)
        {
            string[] str = e.Parameter.Split(';');
            if (str.Length != 2)
            {
                return;
            }

            int toolInvId = str[1].ToInt32(0);

            if (toolInvId == 0)
            {
                return;
            }

            //store in sesion
            Session["ToolInvId"] = toolInvId;

            LoadToolRackPopup(toolInvId);
        }
Example #8
0
 protected void DosyaYuklemePopup_WindowCallback(object source, DevExpress.Web.PopupWindowCallbackArgs e)
 {
     DosyaYuklemePopup.JSProperties["cpCustomerEmployeeID"] = -1;     // customerEmployee.Id;
     DosyaYuklemePopup.JSProperties["cpHeaderText"]         = "test"; // string.Format("Edit Customer Contact ({0} {1})", "customerEmployee.FirstName", "customerEmployee.LastName");
 }
Example #9
0
        protected void ASPxPopupControl1_WindowCallback(object source, DevExpress.Web.PopupWindowCallbackArgs e)
        {
            string key = e.Parameter;

            Session["TransferUser"] = key;
        }
Example #10
0
        protected void KullaniciEditPopup_WindowCallback(object source, DevExpress.Web.PopupWindowCallbackArgs e)
        {
            string kullaniciAdi = e.Parameter.ToString();

            if (kullaniciAdi == null)
            {
                return;
            }
            ASPxEdit editor = GetNestedEditor(EmployeeEditFormLayout, "ParolaAlani");

            if (editor != null)
            {
                if (kullaniciAdi == "")
                {
                    ParolayiDegistir.Visible = false;
                    tbPassword.Visible       = true;
                }
                else
                {
                    ParolayiDegistir.Visible = true;
                    tbPassword.Visible       = false;
                }
            }

            var employee = Membership.GetAllUsers().Cast <MembershipUser>().Where(c => c.UserName == kullaniciAdi).FirstOrDefault(); //DataProvider.Employees.FirstOrDefault(em => em.Id == id);

            if (employee == null)
            {
                KullaniciEditPopup.JSProperties["cpUserKey"]    = null;
                KullaniciEditPopup.JSProperties["cpHeaderText"] = string.Format("Yeni Kullanıcı Oluştur ({0} {1})", "", "");
            }
            else
            {
                ProfileBase curProfile = ProfileBase.Create(kullaniciAdi);

                FirstNameTextBox.Text = curProfile.GetPropertyValue("Ismi").ToString();
                LastNameTextBox.Text  = curProfile.GetPropertyValue("Soyismi").ToString();
                PrefixComboBox.Value  = curProfile.GetPropertyValue("Onek").ToString();
                HireDateEdit.Value    = curProfile.GetPropertyValue("DogumTarihi");

                UserNameTextBox.Text      = employee.UserName;
                tbPassword.Text           = "parola değiştirilemez";
                EmailTextBox.Value        = employee.Email;
                MobileNumberTextBox.Value = curProfile.GetPropertyValue("CepNumarasi");

                BayiKoduComboBox.Value = curProfile.GetPropertyValue("BayiKodu");
                DeptComboBox.Value     = curProfile.GetPropertyValue("DepartmanAdi");
                TitleTextBox.Text      = curProfile.GetPropertyValue("Unvani").ToString();
                ResimAdi = curProfile.GetPropertyValue("ResimAdi").ToString();

                PurchaseAuthorityCheckBox.Checked = employee.IsApproved;

                if (Roles.GetRolesForUser(UserNameTextBox.Text)[0] != null)
                {
                    cmbRole.Value = Roles.GetRolesForUser(kullaniciAdi)[0] != null?Roles.GetRolesForUser(kullaniciAdi)[0].ToString() : "";
                }

                MembershipUser user = Membership.GetUser(employee.UserName);
                chkHesapKiliti.Enabled = user.IsLockedOut;
                chkHesapKiliti.Checked = user.IsLockedOut;

                KullaniciEditPopup.JSProperties["cpUserKey"]    = kullaniciAdi;
                KullaniciEditPopup.JSProperties["cpHeaderText"] = string.Format("Kullanıcı Düzenleme ({0} {1})", curProfile.GetPropertyValue("Ismi").ToString(), curProfile.GetPropertyValue("Soyismi").ToString());
            }
        }