protected void ASPxCallbackPanel1_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e) { switch (e.Parameter.ToString()) { case "thu": { ASPxFormLayout1.FindItemByFieldName("txttotal").Caption = "Tổng tiền phiếu thu"; break; } case "chi": { ASPxFormLayout1.FindItemByFieldName("txttotal").Caption = "Tổng tiền phiếu chi"; break; } case "unc": { ASPxFormLayout1.FindItemByFieldName("txttotal").Caption = "Tổng tiền phiếu ủy nhiệm chi"; break; } case "unt": { ASPxFormLayout1.FindItemByFieldName("txttotal").Caption = "Tổng tiền phiếu ủy nhiệm thu"; break; } default: break; } }
private void GetFormValues() { var firstName = ASPxFormLayout1.GetNestedControlValueByFieldName("FirstName"); var lastName = ASPxFormLayout1.GetNestedControlValueByFieldName("LastName"); var gender = ASPxFormLayout1.GetNestedControlValueByFieldName("Gender"); var birthDate = ASPxFormLayout1.GetNestedControlValueByFieldName("BirthDate"); var phoneNumber = ASPxFormLayout1.GetNestedControlValueByFieldName("PhoneNumber"); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ASPxFormLayout1.DataSource = GetData(); ASPxFormLayout1.DataBind(); } }
private void SetAssessmentValues() { _Iassessment.TaxAccountNo = int.Parse(ASPxFormLayout1.GetNestedControlValueByFieldName("TaxAccountNo").ToString()); _Iassessment.AssessmentYear = int.Parse(ASPxFormLayout1.GetNestedControlValueByFieldName("AssessmentYear").ToString()); _Iassessment.FormNo = (string)ASPxFormLayout1.GetNestedControlValueByFieldName("FormNo"); _Iassessment.FormTitle = (string)ASPxFormLayout1.GetNestedControlValueByFieldName("FormTitle"); _Iassessment.AssessmentDate = dtAssessmentDate.Date; _Iassessment.CreatedBy = Global.SessionUser.UserName; _Iassessment.CreateDate = DateTime.Now; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ASPxPageControl1.ActiveTabPage = ASPxPageControl1.TabPages[0]; ASPxFormLayout1.ForEach(ClearItem); SetTabEnableProperty(false); IsNew = true; } }
protected void ASPxButton1_Click(object sender, EventArgs e) { Customer cust = XpoDataSource1.Session.GetObjectByKey <Customer>(navigateComboBox.Value); if (cust == null) { cust = new Customer(XpoDataSource1.Session); } cust.CompanyName = ((ASPxTextBox)ASPxFormLayout1.FindNestedControlByFieldName("CompanyName")).Text; cust.ContactName = ((ASPxTextBox)ASPxFormLayout1.FindNestedControlByFieldName("ContactName")).Text; cust.Country = ((ASPxTextBox)ASPxFormLayout1.FindNestedControlByFieldName("Country")).Text; cust.Phone = ((ASPxTextBox)ASPxFormLayout1.FindNestedControlByFieldName("Phone")).Text; cust.Save(); navigateComboBox.Value = cust.Oid; }
protected void ASPxFormLayout1_DataBound(object sender, EventArgs e) { ASPxFormLayout1.ForEach(ClearItem); }