Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // Izvrsi event za incijalizaciju controllera
            OnInitController();

            var model = Controller.GetData(ModelId);

            GridProviderContactView.DataSource = model.Contacts;
            GridProviderContactView.DataBind();

            GridNoteView.DataSource = model.Notes;
            GridNoteView.DataBind();

            var layoutdata = Controller.GetLayoutData(model);

            FormLayoutProvider.DataSource = layoutdata;
            FormLayoutProvider.DataBind();
        }
Beispiel #2
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            string PersonaliIdentificationNumber = FormLayoutProvider.GetNestedControlValueByFieldName("PersonalIdentificationNumber") == null ? string.Empty : FormLayoutProvider.GetNestedControlValueByFieldName("PersonalIdentificationNumber").ToString();
            string Name    = FormLayoutProvider.GetNestedControlValueByFieldName("Name") == null ? string.Empty : FormLayoutProvider.GetNestedControlValueByFieldName("Name").ToString();
            string Bank    = FormLayoutProvider.GetNestedControlValueByFieldName("Bank") == null ? string.Empty : FormLayoutProvider.GetNestedControlValueByFieldName("Bank").ToString();
            string IBAN    = FormLayoutProvider.GetNestedControlValueByFieldName("IBAN") == null ? string.Empty : FormLayoutProvider.GetNestedControlValueByFieldName("IBAN").ToString();
            string Country = FormLayoutProvider.GetNestedControlValueByFieldName("Country") == null ? string.Empty : FormLayoutProvider.GetNestedControlValueByFieldName("Country").ToString();
            string City    = FormLayoutProvider.GetNestedControlValueByFieldName("City") == null ? string.Empty : FormLayoutProvider.GetNestedControlValueByFieldName("City").ToString();
            string Address = FormLayoutProvider.GetNestedControlValueByFieldName("Address") == null ? string.Empty : FormLayoutProvider.GetNestedControlValueByFieldName("Address").ToString();

            var model = Controller.GetData(ModelId);

            model.IBAN = IBAN;
            model.Name = Name;
            model.Bank = Bank;
            model.PersonalIdentificationNumber = PersonaliIdentificationNumber;
            model.Country = Country;
            model.City    = City;
            model.Address = Address;

            Controller.Update(model);
        }