private void SetControlProperty() { RefEditor refPOID = ucEdit_PaymentRequest.FindControl("ref_MR_PaymentRequest__POID") as RefEditor; if (refPOID != null) { this.ucList_PaymentRequest.Title = "PO Related Payment"; this.ucList_PaymentRequest.FilterSqlWhere = "POID = '" + refPOID.RefCodeValue + "'"; this.ucList_PaymentRequest.RefreshGrid(); } //DDLRefrence drpState = ucEdit_PaymentRequest.FindControl("cboref_LOG_PR__PRTypeID") as DDLRefrence ; //if(drpState != null) //{ // DropDownList ddlList = drpState.FindControl("Refdrop") as DropDownList ; // if(ddlList != null) // { // ddlList.SelectedValue = Request.QueryString.Get("PRType").ToString(); // } //} //DDLRefrence cborefStatus = ucEdit_PaymentRequest.FindControl("cboref_LOG_PR__Status") as DDLRefrence ; //DataTable dt = ucEdit_PaymentRequest.dtEditDataCollection ; // if(cborefStatus != null) // { // DropDownList ddlList = cborefStatus.FindControl("Refdrop") as DropDownList ; // if(ddlList != null) // { // for( int i = 0 ; i < ddlList.Items.Count ; i++) // { // if( ddlList.Items[i].Value == Convert.ToString(((int)PRState.Close))) // { // ddlList.Items.RemoveAt(i) ; // break ; // } // } // } // } //if(cborefStatus != null) //{ // if( dt != null && dt.Rows.Count > 0) // { // if( !dt.Rows[0]["LOG_PR.Status"].ToString().Equals(Convert.ToString((int)PRState.Close)) ) // { // cborefStatus.WhereSql = "LOG_PR_Status.PRIDKey <> '"+((int)PRState.Close).ToString()+"'"; // cborefStatus.Refresh(); // } // } //} }
public void ucEdit_PaymentRequest_VoucherItemSelected(object sender, EventArgs e) { if (sender is RefEditor) { RefEditor refSender = (RefEditor)sender; string POID = refSender.RefCodeValue; // Get the PO Amount & PO Currency DAEPOBidFlow POdataEntity = new DAEPOBidFlow(); DataTable dt = POdataEntity.GetPrintData(POID); TextBox txtPOAmount = this.ucEdit_PaymentRequest.FindControl("txt_MR_PaymentRequest__POAmount") as TextBox; if (txtPOAmount != null && dt.Rows.Count > 0) { Decimal amount = Decimal.Parse(dt.Rows[0]["Amount"].ToString()); txtPOAmount.Text = amount.ToString("N4"); } DDLRefrence refTemp = this.ucEdit_PaymentRequest.FindControl("cboref_MR_PaymentRequest__POCur") as DDLRefrence; if (refTemp != null && dt.Rows.Count > 0) { DropDownList ddlTemp = refTemp.FindControl("Refdrop") as DropDownList; if (ddlTemp != null) { ddlTemp.SelectedValue = dt.Rows[0]["ContractTotalCostCUR"].ToString(); } } refTemp = this.ucEdit_PaymentRequest.FindControl("cboref_MR_PaymentRequest__InvoiceCur") as DDLRefrence; if (refTemp != null && dt.Rows.Count > 0) { DropDownList ddlTemp = refTemp.FindControl("Refdrop") as DropDownList; if (ddlTemp != null) { ddlTemp.SelectedValue = dt.Rows[0]["ContractTotalCostCUR"].ToString(); } } RefEditor refVendorID = ucEdit_PaymentRequest.FindControl("ref_MR_PaymentRequest__VendorID") as RefEditor; if (refVendorID != null && dt.Rows.Count > 0) { refVendorID.RefCodeValue = dt.Rows[0]["BidderID"].ToString(); refVendorID.RefNameValue = dt.Rows[0]["Name"].ToString(); } } }
private void InitEditControlValue() { //新增状态下的控件设置 if (this.CurrentPageState == PageState.State_New) { //初始化创建人 RefEditor ref_CreateBy = ucEdit_PaymentRequest.GetControl("ref_MR_PaymentRequest__CreateBy") as RefEditor; if (ref_CreateBy != null) { ref_CreateBy.RefCodeValue = CurrentUser.UserID; ref_CreateBy.RefNameValue = CurrentUser.UserName; } } }
private void OpenConnectedPanel() { UIBuilder uiBuilder1 = panel.SwapPanel(NeosSwapCanvasPanel.Slide.None, 0.5f); //uiBuilder1.VerticalLayout(4f, 0.0f, new Alignment?()); uiBuilder1.VerticalLayout(4f, 0, new Alignment?()); uiBuilder1.FitContent(SizeFit.Disabled, SizeFit.PreferredSize); uiBuilder1.Style.PreferredHeight = 65f; uiBuilder1.Style.MinHeight = 32f; uiBuilder1.Style.TextAutoSizeMin = 45f; uiBuilder1.Style.TextAutoSizeMax = 65f; //status text //SyncRef<Text> status = this._status; //LocaleString localeString1 = (LocaleString)""; //ref LocaleString local1 = ref localeString1; //Alignment? alignment1 = new Alignment?(); //Text text1 = uiBuilder1.Text(in local1, true, alignment1, true, (string)null); //status.Target = text1; //Title uiBuilder1.Style.PreferredHeight = 200f; Text text4 = uiBuilder1.Text("MetaGenNeos"); text4.AutoSizeMax.Value = 150f; text4.Size.Value = 150f; //Description uiBuilder1.Style.MinHeight = 350f; Text text1 = uiBuilder1.Text("<b>This recording system is currenlty in Beta. Expect bugs</b>. MetaGen is a project to explore the intersection between AI and VR technologies, for Science, Art, and Wonder. See more details at http://metagen.ai"); uiBuilder1.Style.MinHeight = 32f; ////Recording checkbox //uiBuilder1.Style.PreferredHeight = 100f; //uiBuilder1.Style.MinHeight = 100f; //Checkbox checkbox_record_user = uiBuilder1.Checkbox("Record me (local)",false); //this._recordUserCheckbox.Target = checkbox_record_user; //if (!mg.admin_mode) //{ // recordUserOverride = uiBuilder1.Current.AttachComponent<ValueUserOverride<bool>>(); // recordUserOverride.CreateOverrideOnWrite.Value = true; // recordUserOverride.Target.Target = checkbox_record_user.State; //} ////Data submission checkbox //uiBuilder1.Style.MinHeight = 350f; //Text text2 = uiBuilder1.Text("<b>By checking this box you agree to license the recorded data as CC0 (Public domain), as part of the MetaGen Public Dataset (intended for research in AI and other sciences).</b>"); //text2.HorizontalAlign.Value = CodeX.TextHorizontalAlignment.Left; //uiBuilder1.Style.PreferredHeight = 100f; //uiBuilder1.Style.MinHeight = 100f; //Checkbox checkbox_public_domain = uiBuilder1.Checkbox("Public domain",false); //this._publicDomainCheckbox.Target = checkbox_public_domain; //if (!mg.admin_mode) //{ // publicDomainOverride = uiBuilder1.Current.AttachComponent<ValueUserOverride<bool>>(); // publicDomainOverride.Target.Target = checkbox_public_domain.State; //} //recording time uiBuilder1.Style.PreferredHeight = 75f; uiBuilder1.Style.MinHeight = 75f; SyncRef <Text> recording_time = this._recordingTime; LocaleString localeString2 = (LocaleString)""; Text text3 = uiBuilder1.Text(localeString2); recording_time.Target = text3; uiBuilder1.Style.PreferredHeight = 100f; uiBuilder1.Style.MinHeight = 100f; //animation checkbox Checkbox animCheckbox = uiBuilder1.Checkbox("Generate animation", true); this._animationsCheckbox.Target = animCheckbox; //Generate bvh checkbox Checkbox checkbox5 = uiBuilder1.Checkbox("Generate bvh", false); this._generateBvhCheckbox.Target = checkbox5; //Recording voices checkbox Checkbox recording_voices_checkbox = uiBuilder1.Checkbox("Record voices", true); this._recordVoicesCheckbox.Target = recording_voices_checkbox; #if NOHL //Recording hearing checkbox Checkbox recording_hearing_checkbox = uiBuilder1.Checkbox("Record hearing", true); this._recordHearingCheckbox.Target = recording_hearing_checkbox; #endif //video checkbox //Checkbox videoCheckbox = uiBuilder1.Checkbox("Record vision",true); #if NOHL Checkbox videoCheckbox = uiBuilder1.Checkbox("Record vision", false); this._videoCheckbox.Target = videoCheckbox; #endif //record button uiBuilder1.Style.PreferredHeight = 120f; uiBuilder1.Style.MinHeight = 120f; SyncRef <Button> recordButton = this._recordButton; Button button1 = uiBuilder1.Button(""); recordButton.Target = button1; ButtonValueSet <bool> comp1 = button1.Slot.AttachComponent <ButtonValueSet <bool> >(); comp1.SetValue.Value = true; comp1.TargetValue.Target = record_button_pressed.Target; ////Hiding for now as its WIP ////interact button uiBuilder1.Style.PreferredHeight = 120f; uiBuilder1.Style.MinHeight = 120f; SyncRef <Button> interactButton = this._interactButton; Button button1b = uiBuilder1.Button("Toggle Interaction"); interactButton.Target = button1b; ButtonValueSet <bool> comp1b = button1b.Slot.AttachComponent <ButtonValueSet <bool> >(); comp1b.SetValue.Value = true; comp1b.TargetValue.Target = interact_button_pressed.Target; //Text for debug play section uiBuilder1.Style.PreferredHeight = 200f; uiBuilder1.Style.MinHeight = 100f; Text text5 = uiBuilder1.Text("Debug play"); text4.AutoSizeMax.Value = 130f; text4.Size.Value = 130f; uiBuilder1.Style.MinHeight = 100f; uiBuilder1.Style.PreferredHeight = 100f; //Recording index uiBuilder1.Style.PreferredHeight = 75f; uiBuilder1.Style.MinHeight = 75f; Text text6 = uiBuilder1.Text("Recording index:"); TextField field1 = uiBuilder1.TextField("0"); this._recordIndexField.Target = field1; uiBuilder1.Style.MinHeight = 100f; uiBuilder1.Style.PreferredHeight = 100f; //Voices checkbox Checkbox checkbox1 = uiBuilder1.Checkbox("Voices", true); this._voicesCheckbox.Target = checkbox1; //Hearing checkbox Checkbox checkbox2 = uiBuilder1.Checkbox("Hearing", false); this._hearingCheckbox.Target = checkbox2; //External source checkpoint Checkbox checkbox3 = uiBuilder1.Checkbox("External source", false); this._externalSourceCheckbox.Target = checkbox3; //animation checkbox2 Checkbox animCheckbox2 = uiBuilder1.Checkbox("Generate animation", false); this._animationsCheckbox2.Target = animCheckbox2; //Generate bvh checkbox Checkbox bvhCheckbox2 = uiBuilder1.Checkbox("Generate bvh", false); this._generateBvhCheckbox2.Target = bvhCheckbox2; //Avatar ref uiBuilder1.Style.PreferredHeight = 75f; uiBuilder1.Style.MinHeight = 75f; Text text7 = uiBuilder1.Text("Avatar slot:"); uiBuilder1.Next("Root"); ReferenceField <Slot> refField = uiBuilder1.Current.AttachComponent <ReferenceField <Slot> >(); this._avatarRefField.Target = refField; RefEditor avatarRefEditor = uiBuilder1.Current.AttachComponent <RefEditor>(); avatarRefEditor.Setup(refField.Reference); uiBuilder1.Style.MinHeight = 100f; uiBuilder1.Style.PreferredHeight = 100f; //play button SyncRef <Button> streamButton = this._playButton; Button button2 = uiBuilder1.Button(""); streamButton.Target = button2; ButtonValueSet <bool> comp2 = button2.Slot.AttachComponent <ButtonValueSet <bool> >(); comp2.SetValue.Value = true; comp2.TargetValue.Target = play_button_pressed.Target; ////UI slot ref //uiBuilder1.Style.PreferredHeight = 75f; //uiBuilder1.Style.MinHeight = 75f; //Text text8 = uiBuilder1.Text("UI slot:"); //uiBuilder1.Next("Root"); //ReferenceField<Slot> refField2 = uiBuilder1.Current.AttachComponent<ReferenceField<Slot>>(); //this._uiTemplateRefField.Target = refField2; //RefEditor uiTemplateRefEditor = uiBuilder1.Current.AttachComponent<RefEditor>(); //uiTemplateRefEditor.Setup(refField2.Reference); //uiBuilder1.Style.MinHeight = 100f; //uiBuilder1.Style.PreferredHeight = 100f; ////swapUI button //Button button3 = uiBuilder1.Button(""); //this._swapUIButton.Target = button3; //ButtonValueSet<bool> comp3 = button3.Slot.AttachComponent<ButtonValueSet<bool>>(); //comp3.SetValue.Value = true; //comp3.TargetValue.Target = swapUI_button_pressed.Target; }