k3wise dotnet开发老单据时序簿工具条添加按钮


public class FMenuICMOBillNo: MarshalByRefObject,IButtonAction { public void MainFunction(String sKey, K3List.ICList oList, Boolean bCancel) { KFO.Vector v = oList.GetSelData("FBillNo"); if (v.UBound > 0) { K3Connection.AppConnection OBJ = new K3Connection.AppConnection(); int i = 0; string zfirst_mono = ""; foreach (KFO.Dictionary d in v) { i++; string zv = d.GetValue("FBillNo") as string; if (i == 1) { zfirst_mono = zv; if (zfirst_mono.LastIndexOf("-") > 4) { zfirst_mono = zfirst_mono.Substring(0, zfirst_mono.LastIndexOf("-")); } if (zfirst_mono.IndexOf("CR-Z") != 0) { zfirst_mono = zfirst_mono.Replace("CR-", "CR-Z"); } } string sqlUpdate = string.Format("Update ICMO set FbillNo=N'{0}' where FbillNo=N'{1}'", zfirst_mono + "-00" + i.ToString(), zv); OBJ.Execute3(sqlUpdate); } oList.Refresh();//需要添加AxK3List引用 } }

  

原文地址:https://www.cnblogs.com/coolyylu/p/12562336.html