protected void PoPuP(object sender, DirectEventArgs e) { PropertiesGrid.Disabled = false; int id = Convert.ToInt32(e.ExtraParams["id"]); string type = e.ExtraParams["type"]; currentCategory.Text = id.ToString(); PropertiesStore.Reload(); panelRecordDetails.ActiveIndex = 0; switch (type) { case "imgEdit": //Step 1 : get the object from the Web Service RecordRequest r = new RecordRequest(); r.RecordID = id.ToString(); RecordResponse <AssetManagementCategory> response = _assetManagementService.ChildGetRecord <AssetManagementCategory>(r); if (!response.Success) { X.MessageBox.ButtonText.Ok = Resources.Common.Ok; Common.errorMessage(response); return; } //Step 2 : call setvalues with the retrieved object FillParent(); //ApprovalStore.Reload(); this.BasicInfoTab.SetValues(response.result); this.EditRecordWindow.Title = Resources.Common.EditWindowsTitle; this.EditRecordWindow.Show(); break; case "imgDelete": X.Msg.Confirm(Resources.Common.Confirmation, Resources.Common.DeleteOneRecord, new MessageBoxButtonsConfig { Yes = new MessageBoxButtonConfig { //We are call a direct request metho for deleting a record Handler = String.Format("App.direct.DeleteRecord({0})", id), Text = Resources.Common.Yes }, No = new MessageBoxButtonConfig { Text = Resources.Common.No } }).Show(); break; case "imgAttach": //Here will show up a winow relatice to attachement depending on the case we are working on break; default: break; } }
protected void PoPuP(object sender, DirectEventArgs e) { branchId.ReadOnly = true; disposedDate.Hidden = true; BasicInfoTab.Reset(); int id = Convert.ToInt32(e.ExtraParams["id"]); string type = e.ExtraParams["type"]; FillCurrency(); FillBranch(); Panel8.Disabled = false; panelRecordDetails.ActiveIndex = 0; switch (type) { case "imgEdit": //Step 1 : get the object from the Web Service RecordRequest r = new RecordRequest(); r.RecordID = id.ToString(); RecordResponse <AssetManagementAsset> response = _assetManagementService.ChildGetRecord <AssetManagementAsset>(r); if (!response.Success) { X.MessageBox.ButtonText.Ok = Resources.Common.Ok; Common.errorMessage(response); return; } //Step 2 : call setvalues with the retrieved object FillStatus(); FillCondition(); FillCategories(); this.BasicInfoTab.SetValues(response.result); if (response.result.status == 4) { SetBasicInfoFormEnable(false); disposedDate.Hidden = false; } else { SetBasicInfoFormEnable(true); disposedDate.Hidden = true; } // status.Select( XMLStatus.Where(x => x.key == response.result.status).Count() != 0 ? XMLStatus.Where(x => x.key == response.result.status).First().value.ToString() : string.Empty); supplierId.setSupplier(response.result.supplierId); employeeFullName.Text = response.result.employeeName; this.EditRecordWindow.Title = Resources.Common.EditWindowsTitle; this.EditRecordWindow.Show(); break; case "imgDelete": X.Msg.Confirm(Resources.Common.Confirmation, Resources.Common.DeleteOneRecord, new MessageBoxButtonsConfig { Yes = new MessageBoxButtonConfig { //We are call a direct request metho for deleting a record Handler = String.Format("App.direct.DeleteRecord({0})", id), Text = Resources.Common.Yes }, No = new MessageBoxButtonConfig { Text = Resources.Common.No } }).Show(); break; case "imgAttach": //Here will show up a winow relatice to attachement depending on the case we are working on break; default: break; } }
protected void PoPuP(object sender, DirectEventArgs e) { int id = Convert.ToInt32(e.ExtraParams["id"]); string type = e.ExtraParams["type"]; switch (type) { case "imgEdit": //Step 1 : get the object from the Web Service RecordRequest r = new RecordRequest(); r.RecordID = id.ToString(); RecordResponse <AssetManagementLoan> response = _assetManagementService.ChildGetRecord <AssetManagementLoan>(r); if (!response.Success) { X.MessageBox.ButtonText.Ok = Resources.Common.Ok; Common.errorMessage(response); return; } //Step 2 : call setvalues with the retrieved object this.BasicInfoTab.SetValues(response.result); apId.setApprovalStatus(response.result.status.ToString()); assetId.setAsset(response.result.assetId); employeeId.GetStore().Add(new object[] { new { recordId = response.result.employeeId, fullName = response.result.employeeName } }); employeeId.SetValue(response.result.employeeId); // status.Select( XMLStatus.Where(x => x.key == response.result.status).Count() != 0 ? XMLStatus.Where(x => x.key == response.result.status).First().value.ToString() : string.Empty); this.EditRecordWindow.Title = Resources.Common.EditWindowsTitle; this.EditRecordWindow.Show(); break; case "imgDelete": X.Msg.Confirm(Resources.Common.Confirmation, Resources.Common.DeleteOneRecord, new MessageBoxButtonsConfig { Yes = new MessageBoxButtonConfig { //We are call a direct request metho for deleting a record Handler = String.Format("App.direct.DeleteRecord({0})", id), Text = Resources.Common.Yes }, No = new MessageBoxButtonConfig { Text = Resources.Common.No } }).Show(); break; case "imgAttach": //Here will show up a winow relatice to attachement depending on the case we are working on break; default: break; } }
protected void PoPuP(object sender, DirectEventArgs e) { FillBranch(); FillDepartment(); BasicInfoTab.Reset(); panelRecordDetails.ActiveIndex = 0; ApprovalsGridPanel.Disabled = false; int id = Convert.ToInt32(e.ExtraParams["id"]); currentPurchaseOrderId.Text = id.ToString(); string type = e.ExtraParams["type"]; switch (type) { case "imgEdit": ApprovalStore.Reload(); //Step 1 : get the object from the Web Service RecordRequest r = new RecordRequest(); r.RecordID = id.ToString(); RecordResponse <AssetManagementPurchaseOrder> response = _assetManagementService.ChildGetRecord <AssetManagementPurchaseOrder>(r); if (!response.Success) { X.MessageBox.ButtonText.Ok = Resources.Common.Ok; Common.errorMessage(response); return; } //Step 2 : call setvalues with the retrieved object employeeId.GetStore().Add(new object[] { new { recordId = response.result.employeeId, fullName = response.result.employeeName } }); employeeId.SetValue(response.result.employeeId); this.BasicInfoTab.SetValues(response.result); supplierId.setSupplier(response.result.supplierId); categoryId.setCategory(response.result.categoryId); if (!string.IsNullOrEmpty(response.result.currencyId)) { CurrencyControl.setCurrency(response.result.currencyId); } //if (response.result.status == null) //{ // status.Select("1"); // status.SetValue("1"); //} apStatus.setApprovalStatus("1"); this.EditRecordWindow.Title = Resources.Common.EditWindowsTitle; this.EditRecordWindow.Show(); break; case "imgDelete": X.Msg.Confirm(Resources.Common.Confirmation, Resources.Common.DeleteOneRecord, new MessageBoxButtonsConfig { Yes = new MessageBoxButtonConfig { //We are call a direct request metho for deleting a record Handler = String.Format("App.direct.DeleteRecord({0})", id), Text = Resources.Common.Yes }, No = new MessageBoxButtonConfig { Text = Resources.Common.No } }).Show(); break; case "imgAttach": //Here will show up a winow relatice to attachement depending on the case we are working on break; default: break; } }