protected override void ChangeBillSate(UBillState uBillState) { base.ChangeBillSate(uBillState); this.IsEnableUD = false; this.IsEnableOG = false; this.IsEnableRCNew = false; this.IsEnableRCList = false; //var cDC = this.DContextMain as V_Sale_Order_PD; //this.IsEnableXYInPut = false; switch (uBillState) { case UBillState.View: if (_DC.OGType == 2) { this.IsEnableRCNew = true; this.IsEnableRCList = true; } break; case UBillState.Drop: break; case UBillState.New: this.IsEnableUD = true; this.IsEnableOG = true; this.IsCheckUD1 = true; this.IsCheckOG1 = true; break; case UBillState.Edit: if (string.IsNullOrEmpty(_DC.Checker)) { if (!string.IsNullOrEmpty(_DC.CusCode)) { ComHelpLensCode.LoadCusLensCodeSmartPD(_DC.CusCode); } this.IsEnableUD = true; this.IsEnableOG = true; } break; } }
partial void OnCusCodeChanged() { if (EditState != 1) { return; } this.CusName = ""; ComHelpLensCode.LoadCusLensCodeSmartPD(this.CusCode); var _Rs = ComHelpCusCode.UHV_B_CustomerRightBrowse.Where(item => item.CusCode.ToUpper() == this.CusCode.MyStr()).FirstOrDefault(); if (_Rs == null) { return; } this.CusName = _Rs.CusName; }