private void SaveBarCode(ComBarCodeLensInfo _BC) { MWare_Bill _Model = new MWare_Bill() { BCode = "", BDate = System.DateTime.Now, BType = "KFBCIPD", CusCode = "", F_IO = true, F_SD = false, FBCode = "", Maker = USysInfo.UserCode, ID = "", MName = USysInfo.UserName, MType = "L", Remark = "", WhCode = this._WhCodeInfo, }; _Model.Sub_PD = new MWare_Bill_PD() { F_LR = _BC.F_LR, ID = "", LensCode = _BC.LensCode }; MWare_Bill_PD_Detail _Sub = new MWare_Bill_PD_Detail() { ID = "", SubID = 1, SPH = _BC.SPH, CYL = _BC.CYL, X_ADD = _BC.X_ADD, Price = 0, Qty = 1 }; _Model.Sub_PD_Detail = new System.Collections.Generic.List <MWare_Bill_PD_Detail>(); _Model.Sub_PD_Detail.Add(_Sub); DSWare_Bill _DS = new DSWare_Bill(); _DS.Add(USysInfo.DBCode, USysInfo.LgIndex, _Model, geted => { if (geted.HasError) { MessageErp.ErrorMessage(geted.Error.Message.GetErrMsg()); geted.MarkErrorAsHandled(); return; } }, null); }
private void GetRecordBarCodeInfo() { if (string.IsNullOrEmpty(this.WhCodeInfo)) { MessageErp.ErrorMessage(ErpUIText.Get("ERP_ErrWhCodeRequired")); return; } ComBarCodeLensInfo _BC = ComBarCodeLens.GetLensInfoFromBarCode(this.BarCodeInfo); if (null != _BC) { this.MsgInfo = _BC.LensCode + " | SPH:" + _BC.SPH.ToString() + " | CYL:" + _BC.CYL.ToString() + " | ADD:" + _BC.X_ADD.ToString() + _BC.F_LR; this.BarCodeInfo = ""; this.SaveBarCode(_BC); } }