public void EditPerformancePackagePlacement(EditData editData) { WaitForLoaderSpinnerToDisappear(); SetPlacementsTabData(new PlacementsTabData { Placements = new List <PlacementData> { new PlacementData { PlacementName = editData.Name, AutoGenerateName = false } } }, true); }
private void btnUpdateAcc_Click(object sender, EventArgs e) { EditData ed = new EditData();//instantiate the AddData class int id = int.Parse(txtId.Text); decimal updatedBalance = decimal.Parse(txtBal.Text); ed.UpdateBalance(updatedBalance, id); MessageBox.Show("Account Withdrawal Successful"); this.Close(); var form = new AccountsListForm(); form.Show(); form.RefreshDataGrid(); }
public override EditData GetData(int id, out Notification notification) { notification = new Notification { Type = NotificationType.Success }; DTO.EditData data = new EditData(); data.Data = new TransportCIChargeDto(); data.PaymentTerms = new List <Support.DTO.PaymentTerm>(); data.ContainerTypes = new List <Support.DTO.ContainerType>(); data.ChargeTypes = new List <Support.DTO.TypeOfCharge>(); data.CurrencyTypes = new List <Support.DTO.TypeOfCurrency>(); try { if (id > 0) { using (var context = CreateContext()) { var dbItem = context.TransportCICharge_TransportCICharge_View.SingleOrDefault(o => o.TransportCIChargeID == id); if (dbItem == null) { throw new Exception("Can not found the Transport Cost Forwarder to edit"); } data.Data = converter.DB2DTO_TransportCICharge(dbItem); } //Get list container number with BL number Hashtable filters = new Hashtable(); filters["BLNo"] = data.Data.BLNo; data.ContainerNrs = GetBookingContainer(filters, out notification); } data.PaymentTerms = supportFactory.GetPaymentTerm(); data.ContainerTypes = supportFactory.GetContainerType(); data.ChargeTypes = supportFactory.GetTypeOfCharges().ToList(); data.CurrencyTypes = supportFactory.GetTypeOfCurrency(); } catch (Exception ex) { notification.Type = NotificationType.Error; notification.Message = ex.Message; } return(data); }
public void EditPerformancePackage(EditData editData) { WaitForLoaderSpinnerToDisappear(); if (!string.IsNullOrEmpty(editData.Goal)) { ClearInputAndTypeValue(_txtGoal, editData.Goal); } if (!string.IsNullOrEmpty(editData.Name)) { SetReactCheckBoxState(_chkIsAutoGeneratedPackageName, false); ClearInputAndTypeValue(_txtPackageName, editData.Name); } TriggerOnBlurForCurrentlySelectedInput(); }
//private Workspace _workspace; public DataInitialization(int Width, int Height) { var unityContainerInit = new UnityContainer(); _action = unityContainerInit.Resolve <Actions>(); _selectClass = unityContainerInit.Resolve <Selection>(); _pointSelection = unityContainerInit.Resolve <PointSelection>(); _rectangleSelection = unityContainerInit.Resolve <RectangleSelection>(); _drawClass = unityContainerInit.Resolve <DrawOnCanvas>(new OrderedParametersOverride(new object[] { Width, Height, _action })); _editDate = unityContainerInit.Resolve <EditData>(new OrderedParametersOverride(new object[] { _drawClass, _action })); _rectangl = unityContainerInit.Resolve <RectangleFigure>(); _ellipse = unityContainerInit.Resolve <EllipseFigure>(); _line = unityContainerInit.Resolve <Line>(); _poliLine = unityContainerInit.Resolve <PolylineFigure>(); _polygon = unityContainerInit.Resolve <PolygonFigure>(); _rectangleSelect = unityContainerInit.Resolve <RectangleSelect>(); _listFigures.Add(_rectangl); _listFigures.Add(_ellipse); _listFigures.Add(_line); _listFigures.Add(_poliLine); _listFigures.Add(_polygon); _drawListFigures.Add(_rectangl); _drawListFigures.Add(_ellipse); _drawListFigures.Add(_line); _drawListFigures.Add(_poliLine); _drawListFigures.Add(_polygon); _drawListFigures.Add(_rectangleSelect); _selectionList.Add(_pointSelection); _selectionList.Add(_rectangleSelection); _modesList.Add(unityContainerInit.Resolve <DrawMode>(new OrderedParametersOverride(new object[] { _listFigures, _selectClass, _drawClass }))); _modesList.Add(unityContainerInit.Resolve <SelectRegionMode>(new OrderedParametersOverride(new object[] { _listFigures, _selectClass, _drawClass, _editDate, _selectionList }))); _modesList.Add(unityContainerInit.Resolve <SelectPointoMode>(new OrderedParametersOverride(new object[] { _listFigures, _selectClass, _drawClass, _editDate, _selectionList }))); _workspace = new Workspace(_selectClass, _drawClass, _editDate, _listFigures, _modesList, _drawListFigures); }
public DTO.EditData GetData(int userId, int id, out Library.DTO.Notification notification) { notification = new Notification(); notification.Type = NotificationType.Success; DTO.EditData data = new EditData(); data.Data = new PurchaseOrderDto(); data.Data.PurchaseOrderDetailDTOs = new List <PurchaseOrderDetailDto>(); data.SupplierPaymentTermDtos = new List <SupplierPaymentTermDto>(); try { Framework.DAL.DataFactory fwFactory = new Framework.DAL.DataFactory(); int?companyID = fwFactory.GetCompanyID(userId); using (var context = CreateContext()) { if (id > 0) { data.Data = converter.DB2DTO_PurchaseOrder(context.PurchaseOrderMng_PurchaseOrder_View.FirstOrDefault(o => o.PurchaseOrderID == id)); data.SupplierPaymentTermDtos = converter.DB2DTO_SupplierPaymentTerm(context.PurchaseOrderMng_SupplierPaymentTerm_View.Where(s => s.FactoryRawMaterialID == data.Data.FactoryRawMaterialID).ToList()); } if (id <= 0) { data.Data.RequiredDocuments = "Hóa đơn + phiếu giao hàng"; data.Data.PaymentDocuments = "Hóa đơn + phiếu giao hàng"; data.Data.PurchaseOrderStatusID = 1; //Open data.SupplierPaymentTermDtos = converter.DB2DTO_SupplierPaymentTerm(context.PurchaseOrderMng_SupplierPaymentTerm_View.ToList()); } } } catch (Exception ex) { Exception iEx = Library.Helper.GetInnerException(ex); notification.Type = NotificationType.Error; notification.Message = iEx.Message; } return(data); }
public void Edit(int siteId, int contentId, int userId, EditData editData) { _logger.LogDebug($"edit. siteId: {siteId}, contentId: {contentId}, userId: {userId}, editData: {SerializeData(editData)}"); var columnNames = GetColumnNamesByNetNames(siteId, new List <string> { nameof(editData.Title), nameof(editData.IsInSiteMap) }); if (!columnNames.ContainsKey(nameof(editData.Title))) { throw new Exception("NetName for field Title not found"); } if (!columnNames.ContainsKey(nameof(editData.IsInSiteMap))) { throw new Exception("NetName for field IsInSiteMap not found"); } _logger.LogDebug($"edit. column names: {SerializeData(columnNames)}"); _qpDbConnector.BeginTransaction(IsolationLevel.Serializable); try { var value = new Dictionary <string, string> { { ContentItemIdFieldName, editData.ItemId.ToString(CultureInfo.InvariantCulture) }, { columnNames[nameof(editData.Title)], editData.Title }, { columnNames[nameof(editData.IsInSiteMap)], Convert.ToInt32(editData.IsInSiteMap).ToString() } }; _logger.LogDebug($"edit. mass update. contentId: {contentId}, values: {SerializeData(value)}"); _qpDbConnector.DbConnector.MassUpdate(contentId, new[] { value }, userId); _qpDbConnector.CommitTransaction(); } catch { _qpDbConnector.RollbackTransaction(); throw; } }
public void EditSinglePlacement(EditData editData) { WaitForLoaderSpinnerToDisappear(); var purchaseType = ConvertToPurchaseTypeEnum(_ddlPurchaseType.Text); if (!string.IsNullOrEmpty(editData.Name)) { ClearInputAndTypeValue(_txtPlacementName, editData.Name); } if (!string.IsNullOrEmpty(editData.Goal) && purchaseType.IsGoalEditableForPurchaseType()) { ClearInputAndTypeValue(_txtGoal, editData.Goal); } else if (!string.IsNullOrEmpty(editData.Rate)) { ClearInputAndTypeValue(_txtBaseRate, editData.Rate); } TriggerOnBlurForCurrentlySelectedInput(); }
/// <summary> /// Create an instance of the active prefab, /// position it at the location of the preview, /// and add it persistently to the project content. /// </summary> private void CreateObject() { // Create the new editable object. var objectGO = GameObject.Instantiate( ActiveObjectPrefab, _previewGO.transform.position, _previewGO.transform.rotation); var editable = objectGO.GetComponent<E>(); if (editable is IPrefabInstantiation prefabInstantiation) { prefabInstantiation.PrefabPath = ActiveObjectPrefabDefinition.PrefabPath; } else { m_application.Logger.Error("Trying to create an editable that is not an IPrefabInstantiation!" + editable.ToString()); UtilUnity.Destroy(objectGO); return; } if (editable is ILayerContent layerContent) { layerContent.LayerName = m_application.EstimateLayer(objectGO); } // Give the new editable object a unique name. objectGO.name = ActiveObjectPrefab.name + " (" + Guid.NewGuid().ToString() + ")"; // Add the new editable object to the project content. EditData.Add(objectGO); // Clear the picked points. _pickedInfos.Clear(); }
public DTO.EditData GetSupplierPaymentTerm(int factoryRawMaterialID, out Notification notification) { notification = new Notification(); notification.Type = NotificationType.Success; DTO.EditData data = new EditData(); data.SupplierPaymentTermDtos = new List <SupplierPaymentTermDto>(); try { using (var context = CreateContext()) { data.SupplierPaymentTermDtos = converter.DB2DTO_SupplierPaymentTerm(context.PurchaseOrderMng_SupplierPaymentTerm_View.Where(s => s.FactoryRawMaterialID == factoryRawMaterialID).ToList()); } } catch (Exception ex) { Exception ex_1 = Library.Helper.GetInnerException(ex); notification.Type = NotificationType.Error; notification.Message = ex_1.Message; } return(data); }
public ActionResult Editor(EditData data) { Session["Text"] = data; return(RedirectToAction("Index", "Home")); }
public override void Add(BinElement input) { // add in front of jmpBytes, refTo, nops EditData.Insert(EditData.Count - 3, input); }
public void EditSponsorshipPackage(EditData sponsorshipPackageEditData) { WaitForLoaderSpinnerToDisappear(); Wait.Until(driver => !string.IsNullOrEmpty(_txtSponsorshipName.GetAttribute("value"))); ClearInputAndTypeValue(_txtSponsorshipName, sponsorshipPackageEditData.Name); }
public SelectRegionMode(List <ITypesFigures> ListIFigures, Selection SelectClass, DrawOnCanvas DrawOnCanvas, EditData editData, List <ISelection> selectionList) { _listTypesFigure = ListIFigures; _selectClass = SelectClass; _selectionList = selectionList; _drawClass = DrawOnCanvas; _editData = editData; }
public ActionResult UploadActImg(string cid) { EditData data1 = new EditData() { src = "", title = "" }; EditJson data = new EditJson() { code = 1, msg = "", data = data1 }; try { List <string> imgtype = new List <string>(new string[] { ".jpg", ".gif", ".png" }); HttpFileCollectionBase file = Request.Files; ClubNumber club = db.ClubNumbers.Find(cid); if (club == null) { data.msg += "未发现有效的社团"; } else if (file == null || file.Count < 1) { data.msg += "未成功接收文件"; } else if (!imgtype.Contains(Path.GetExtension(file[0].FileName))) { data.msg = "文件格式错误(jpg/gif/png)"; } else if (file[0].ContentLength > 2048000) { data.msg += "文件大小不允许超过2M"; } else { string filepath = Server.MapPath("~/Content/upload/act/"); if (!Directory.Exists(filepath)) { Directory.CreateDirectory(filepath); } string name = Path.GetFileName(file[0].FileName); if (name.Length > 10) { name = name.Substring(name.Length - 10); } Random r1 = new Random(); name = DateTime.Now.ToString("yyyyMMddhhmmss") + r1.Next(10).ToString() + name; //string ext = Path.GetExtension(name); file[0].SaveAs(filepath + cid + "_" + name); data.code = 0; data.data.title = cid + "_" + name; data.data.src = "../Content/upload/act/" + cid + "_" + name; data.msg += "保存成功"; } return(Json(data, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { data.msg = ex.Message; return(Json(data, JsonRequestBehavior.AllowGet)); } }
public SelectPointoMode(List <ITypesFigures> ListIFigures, Selection SelectClass, DrawOnCanvas DrawClass, EditData EditDat, List <ISelection> selectionList) { _listIFigures = ListIFigures; _selectClass = SelectClass; _selectionList = selectionList; _drawClass = DrawClass; _editData = EditDat; }
public void Put(int id) { IEditData NewEditObject = new EditData(); NewEdittObject.SaveOrderEvent(id); }
private static EditData InstantiateDataAccessObject() { EditData ed = new EditData(); return(ed); }
public EditData GetData(int id, string season, out Notification notification) { notification = new Notification() { Type = NotificationType.Success }; EditData data = new EditData() { Data = new PriceConfigurationDto(), SupportSeason = new List <Support.DTO.Season>() }; try { using (PriceConfigurationEntities context = CreateContext()) { if (id > 0) { List <PriceConfiguration_PriceConfiguration_View> list = context.PriceConfiguration_PriceConfiguration_View.Where(o => o.Season.Equals(season)).ToList(); if (list == null || list.Count == 0) { notification = new Notification() { Type = NotificationType.Error, Message = "Can not find data!" }; return(data); } else { data.Data = converter.DB2DTO_Get(list[0]); data.Data.PriceConfigurationDetailOfFCS = converter.DB2DTO_ListFSC(context.PriceConfiguration_FSC_View.Where(o => o.Season.Equals(season)).ToList()); data.Data.PriceConfigurationDetailOfFrameMaterial = converter.DB2DTO_ListFrameMaterial(context.PriceConfiguration_FrameMaterial_View.Where(o => o.Season.Equals(season)).ToList()); data.Data.PriceConfigurationDetailOfPackingMethod = converter.DB2DTO_ListPackagingMethod(context.PriceConfiguration_PackagingMethod_View.Where(o => o.Season.Equals(season)).ToList()); data.Data.PriceConfigurationDetailOfMaterialColor = converter.DB2DTO_ListMaterialColor(context.PriceConfiguration_MaterialColor_View.Where(o => o.Season.Equals(season)).ToList()); data.Data.PriceConfigurationDetailOfCushionColor = converter.DB2DTO_ListCushionColor(context.PriceConfiguration_CushionColor_View.Where(o => o.Season.Equals(season)).ToList()); } } else { data.Data.PriceConfigurationDetailOfFCS = new List <PriceConfigurationDetailDto>(); data.Data.PriceConfigurationDetailOfMaterialColor = new List <PriceConfigurationDetailDto>(); data.Data.PriceConfigurationDetailOfFrameMaterial = new List <PriceConfigurationDetailDto>(); data.Data.PriceConfigurationDetailOfCushionColor = new List <PriceConfigurationDetailDto>(); data.Data.PriceConfigurationDetailOfPackingMethod = new List <PriceConfigurationDetailDto>(); } data.SupportSeason = supportFactory.GetSeason().ToList(); data.SupportFSCType = supportFactory.GetFSCType().ToList(); data.SupportProductElement = supportFactory.GetProductElement().ToList(); data.SupportPackagingMethod = supportFactory.GetPackagingMethod().ToList(); data.SupportFrameMaterial = supportFactory.GetFrameMaterial().ToList(); data.SupportMaterialColor = dalSupport.GetMaterialColor().ToList(); data.SupportCushionColor = converter.DB2DTO_CushionColor(context.CushionColorMng_CushionColor_View.Where(o => o.IsEnabled == true).ToList()); data.SeasonOfPriceConfiguration = context.PriceConfiguration_PriceConfigurationSearchResult_View.Select(s => s.Season).ToList(); return(data); } } catch (Exception ex) { notification = new Notification() { Type = NotificationType.Error, Message = ex.Message }; return(data); } }
/// <summary> /// 查看 /// </summary> /// <returns></returns> public ActionResult Viewer() { EditData data = Session["Text"] as EditData; return(View(data)); }
void UpdateAuthority(TreeListNode Node) { if (EditData == null) { return; } if (Node.HasChildren) { foreach (TreeListNode Cnode in Node.Nodes) { UpdateAuthority(Cnode); } } else { if (ConvertLib.ToInt(Node.GetValue("AuthorityID")) <= 0) { return; } string filter = String.Format("{0}='{1}'", sys_ModulesFunctionAuthority.FunctionID, Node.GetValue("ParentKey")); var v = EditData.Select(filter); if (Node.Checked) { DataRow dr; if (v.Length > 0) { dr = v[0]; dr[dt_MyRoleAuthority.Authority] = ConvertLib.ToInt(dr[dt_MyRoleAuthority.Authority]) + ConvertLib.ToInt(Node.GetValue("AuthorityID")); } else { dr = EditData.Rows.Add(); dr[dt_MyRoleAuthority.FunctionID] = Node.GetValue("ParentKey"); dr[dt_MyRoleAuthority.Authority] = Node.GetValue("AuthorityID"); if (AddDataRow != null) { AddDataRow(this, new ArgsAddDataRow(dr)); } } } else { if (v.Length > 0) { int authority = 0; if (v.Length > 0) { authority = ConvertLib.ToInt(v[0][dt_MyRoleAuthority.Authority]); } int NoteValue = ConvertLib.ToInt(Node.GetValue("AuthorityID")); if ((authority & NoteValue) == NoteValue)//包含权限 { v[0][dt_MyRoleAuthority.Authority] = authority - NoteValue; } } } } }
public ActionResult Creater(EditData data) { Session["Text"] = data; return(RedirectToAction("Index")); }