Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.securityLevelId = Common.GetEncryptedQueryStringValue("SecurityLevelId", 0);
            LabelPageTitle.Text  = (this.securityLevelId == 0) ? "New Security Level" : "Edit Security Level";

            Page.Form.DefaultFocus  = TextBoxDescription.ClientID;
            Page.Form.DefaultButton = ButtonSave.UniqueID;

            if (!IsPostBack)
            {
                TextBoxDescription.Focus();

                ButtonSave.Visible    = true;
                ButtonSaveNew.Visible = true;

                if (ViewState["SecurityLevelId"] != null)
                {
                    this.securityLevelId = Convert.ToInt32(ViewState["SecurityLevelId"].ToString());
                }
                if (this.securityLevelId != 0)
                {
                    BindSecurityLevel();
                }
            }
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.supplierId     = Common.GetEncryptedQueryStringValue("supplierId", 0);
            LabelPageTitle.Text = (this.supplierId == 0) ? "New Supplier" : "Edit Supplier";
            PanelError.Visible  = false;

            Page.Form.DefaultFocus  = TextBoxDescription.ClientID;
            Page.Form.DefaultButton = ButtonSaveList.UniqueID;

            if (!IsPostBack)
            {
                TextBoxDescription.Focus();
                BindSupplierType();

                ButtonSaveEdit.Visible = true;
                //ButtonSaveNew.Visible = true;

                if (ViewState["supplierId"] != null)
                {
                    this.supplierId = Convert.ToInt32(ViewState["supplierId"].ToString());
                }

                if (this.supplierId != 0)
                {
                    BindSupplier();

                    BindSupplierContact();
                    BindSupplierContactList();
                }
            }
        }
Пример #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.employeeRole   = Common.GetEncryptedQueryStringValue("Description", "");
            LabelPageTitle.Text = (this.employeeRole == "") ? "New Role" : "Edit Role";
            PanelError.Visible  = false;

            Page.Form.DefaultFocus  = TextBoxDescription.ClientID;
            Page.Form.DefaultButton = ButtonSaveList.UniqueID;

            if (!IsPostBack)
            {
                TextBoxDescription.Focus();
                if (ViewState["employeeRole"] != null)
                {
                    this.employeeRole = ViewState["employeeRole"].ToString();
                }
                if (this.employeeRole != "")
                {
                    BindRole();
                    ButtonDelete.Visible = Roles.IsUserInRole("Administrator") || Roles.IsUserInRole("Supplier");
                }
                else
                {
                    ButtonDelete.Visible = false;
                }
            }
        }
Пример #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.merchandisingGroupCustomId = Common.GetEncryptedQueryStringValue("merchandisingGroupCustomId", 0);
            LabelPageTitle.Text             = (this.merchandisingGroupCustomId == 0) ? "New Merchandising Custom Group" : "Edit Merchandising Custom Group";
            PanelError.Visible = false;

            Page.Form.DefaultFocus  = TextBoxDescription.ClientID;
            Page.Form.DefaultButton = ButtonSaveList.UniqueID;

            if (!IsPostBack)
            {
                TextBoxDescription.Focus();
                GridViewResult.Visible = false;

                BindMerchandisingGroupCustom();

                ButtonSaveEdit.Visible = true;
                ButtonSaveNew.Visible  = true;

                ButtonSaveEdit.Text = "Save and Add Category";

                if (ViewState["merchandisingGroupCustomId"] != null)
                {
                    this.merchandisingGroupCustomId = Convert.ToInt32(ViewState["merchandisingGroupCustomId"].ToString());
                }
                if (this.merchandisingGroupCustomId != 0)
                {
                    BindMerchandisingGroupCustom();
                    BindGridViewResult();
                    GridViewResult.Visible = true;
                    ButtonSaveEdit.Text    = "Save and Edit";
                }
            }
        }
Пример #5
0
 private void ButtonNew_Click(object sender, EventArgs e)
 {
     TextBoxDescription.Enabled = true;
     ButtonEdit.Enabled         = false;
     ButtonSave.Enabled         = true;
     ButtonDelete.Enabled       = false;
     TextBoxDescription.Text    = "";
     _meterTypeId = 0;
     TextBoxDescription.Focus();
 }
Пример #6
0
 private void ButtonEdit_Click(object sender, EventArgs e)
 {
     TextBoxDescription.Enabled = true;
     ButtonNew.Enabled          = false;
     ButtonEdit.Enabled         = true;
     ButtonSave.Enabled         = true;
     ButtonDelete.Enabled       = false;
     _save = false;
     TextBoxDescription.Focus();
 }
Пример #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.productId  = Common.GetEncryptedQueryStringValue("ProductId", 0);
            this.supplierId = Common.GetEncryptedQueryStringValue("SupplierId", 0);

            LabelPageTitle.Text = (this.productId == 0) ? "New Product" : "Edit Product";
            PanelError.Visible  = false;

            Page.Form.DefaultFocus  = TextBoxDescription.ClientID;
            Page.Form.DefaultButton = ButtonSaveList.UniqueID;

            if (!IsPostBack)
            {
                TextBoxDescription.Focus();

                BindProductSparHierarchySegment();
                BindProductSparHierarchyFamily();
                BindProductBrand();
                BindMerchandisingGroup();
                BindMerchandisingCategory();

                ButtonSaveEdit.Visible = true;
                //ButtonSaveNew.Visible = true;

                if (ViewState["ProductId"] != null)
                {
                    this.productId = Convert.ToInt32(ViewState["ProductId"].ToString());
                }

                if (ViewState["SupplierId"] != null)
                {
                    this.supplierId = Convert.ToInt32(ViewState["SupplierId"].ToString());
                }

                if (this.productId != 0)
                {
                    BindProduct();
                }
            }
        }
Пример #8
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     TextBoxDescription.Focus();
     TextBoxDescription.SelectAll();
 }