private void Hyperlink_EditData_Click(object sender, RoutedEventArgs e) { if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Common_ShipTypeAreaPrice_Edit)) { Window.Alert("您没有此功能的操作权限!"); return; } ShipTypeAreaPriceInfoVM _infoView = new ShipTypeAreaPriceInfoVM(); dynamic row = QueryResult.SelectedItem; if (row != null) { _infoView.AreaSysNo = row.AreaSysNo; _infoView.ShipTypeSysNo = row.ShipTypeSysNo; _infoView.BaseWeight = row.BaseWeight.ToString(); _infoView.TopWeight = row.TopWeight.ToString(); _infoView.UnitWeight = row.UnitWeight.ToString(); _infoView.UnitPrice = row.UnitPrice.ToString(); _infoView.MaxPrice = row.MaxPrice.ToString(); _infoView.SysNo = row.SysNo; _infoView.ChannelID = _infoView.ListWebChannel[1].ChannelID; _infoView.VendorName = row.VendorName; _infoView.VendorSysNo = row.VendorSysNo; Dialog(_infoView); } }
/// <summary> /// 更新配送方式-地区-价格(非) /// </summary> /// <param name="sysno"></param> /// <param name="callback"></param> public void UpdateShipTypeAreaPrice(ShipTypeAreaPriceInfoVM entity, EventHandler <RestClientEventArgs <dynamic> > callback) { string relativeUrl = "/CommonService/ShipTypeAreaPriceInfo/Update"; var msg = entity.ConvertVM <ShipTypeAreaPriceInfoVM, ShipTypeAreaPriceInfo>(); restClient.Update(relativeUrl, msg, callback); }
public BatchCreateShipTypeAreaPrice() { InitializeComponent(); _priceview = new ShipTypeAreaPriceInfoVM(); _view = new ShipTypeAreaUnInfoVM(); _areaViewList = new List <AreaQueryVM>(); Loaded += new RoutedEventHandler(BatchCreateShipTypeAreaPrice_Loaded); }
/// <summary> /// 新增配送方式-地区-价格(非) /// </summary> /// <param name="_viewInfo"></param> /// <param name="callback"></param> public void CreateShipTypeAreaPrice(ShipTypeAreaPriceInfoVM _viewInfo, EventHandler <RestClientEventArgs <dynamic> > callback) { string relativeUrl = "/CommonService/ShipTypeAreaPriceInfo/Create"; ShipTypeAreaPriceInfo entity = new ShipTypeAreaPriceInfo(); //entity.AreaSysNoList = _viewInfo.AreaSysNoList; entity = _viewInfo.ConvertVM <ShipTypeAreaPriceInfoVM, ShipTypeAreaPriceInfo>(); restClient.Create(relativeUrl, entity, callback); }
private void Dialog(ShipTypeAreaPriceInfoVM entity) { ShipTypeAreaPriceMaintain shipTypeAreaPriceMaintain = new ShipTypeAreaPriceMaintain(entity) { Page = this }; shipTypeAreaPriceMaintain.DiolgHander = Window.ShowDialog(entity == null ? "新建配送方式-地区-价格" : "编辑配送方式-地区-价格", shipTypeAreaPriceMaintain, (s, args) => { QueryResult.Bind(); }); }
public ShipTypeAreaPriceMaintain(ShipTypeAreaPriceInfoVM entity) { InitializeComponent(); if (entity == null) { _view = new ShipTypeAreaPriceInfoVM(); } else { _view = entity; } Loaded += new RoutedEventHandler(ShipTypeAreaPriceMaintain_Loaded); }
private void Reset_Click(object sender, RoutedEventArgs e) { _view = new ShipTypeAreaPriceInfoVM(); LayoutRoot.DataContext = _view; }