private void AddPrice() { if (this.ViewErrList != null && this.ViewErrList.Value.Count > 0) { return; } if (string.IsNullOrEmpty(this.SKeyCode.Trim())) { return; } this._F_LoadDefaultRange = false; var s1 = this.SPH1; var s2 = this.SPH2; var c1 = this.CYL1; var c2 = this.CYL2; var a1 = this.ADD1; var a2 = this.ADD2; var dia = this.Dia; var p1 = this.P1; var p2 = this.P2; MSale_PriceTemplate_Lens model = new MSale_PriceTemplate_Lens() { ADD1 = a1, ADD2 = a2, CYL1 = c1, CYL2 = c2, Dia = dia, ID = "", LensCode = this.SKeyCode, P1 = p1, P2 = p2, SPH1 = s1, SPH2 = s2 }; DSSale_PriceTemplate_Lens _DS = new DSSale_PriceTemplate_Lens(); this.IsBusy = true; _DS.AddPrice(USysInfo.DBCode, USysInfo.LgIndex, model, geted => { this.IsBusy = false; if (geted.HasError) { MessageErp.ErrorMessage(geted.Error.Message.GetErrMsg()); geted.MarkErrorAsHandled(); return; } this.Search(); }, null); }
private void CopyPrice() { DSSale_PriceTemplate_Lens _DS = new DSSale_PriceTemplate_Lens(); this.IsBusy = true; this._F_LoadDefaultRange = false; _DS.CopyPrice(USysInfo.DBCode, USysInfo.LgIndex, this.LensCodeCopy, this.SKeyCode, geted => { this.IsBusy = false; if (geted.HasError) { MessageErp.ErrorMessage(geted.Error.Message.GetErrMsg()); geted.MarkErrorAsHandled(); return; } this.Search(); }, null); }
protected override void Delete() { DSSale_PriceTemplate_Lens _DS = new DSSale_PriceTemplate_Lens(); this.IsBusy = true; this._F_LoadDefaultRange = false; _DS.DeletePrice(USysInfo.DBCode, USysInfo.LgIndex, this.GridListSelectedCodes, geted => { this.IsBusy = false; if (geted.HasError) { MessageErp.ErrorMessage(geted.Error.Message.GetErrMsg()); geted.MarkErrorAsHandled(); return; } this.Search(); }, null); }