/// <summary> /// 审方修改批次(审方用) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void View_OnUpdateCheckFrequencyBatch(object sender, Views.DataManage.EditFrequencyToBatchEventArgs e) { using (CJia.Transaction trans = new CJia.Transaction(CJia.DefaultOleDb.DefaultAdapter)) { CJia.PIVAS.Models.CheckAdviceModel checkAdviceModel = new CJia.PIVAS.Models.CheckAdviceModel(); int checkSeq = checkAdviceModel.GetCheckSeq(); //插入审核表 checkAdviceModel.AddCheck(trans.ID, checkSeq, User.UserId, User.UserNo, User.UserName, User.DeptId, User.DeptName, User.UserId); //更新瓶贴基表 List <string> GroupIndex = new List <string>(); GroupIndex.Add(e.GroupIndex); if (GroupIndex != null && GroupIndex.Count != 0) { checkAdviceModel.DeleteCommonLabel(trans.ID, GroupIndex); checkAdviceModel.InsertCommonLabel(trans.ID, GroupIndex, CJia.PIVAS.User.UserId); checkAdviceModel.InsertLabelDetail(trans.ID, GroupIndex); } //将之前审核明细置为无效 int detailId = checkAdviceModel.GetDetailIdByGroupIndex(e.GroupIndex); int detailSeq = checkAdviceModel.GetCheckDetailSeq(); this.Model.UpdateCheckBatch(trans.ID, detailSeq, checkSeq, e.BatchsName, e.UserId, e.GroupIndex); checkAdviceModel.ModifyCheckDetailValid(trans.ID, User.UserId, detailId); trans.Complete(); this.View.CloseWindow(); } }
public void InitTest() { CJia.ClientConfig.ServerIP = CJia.PIVAS.Tools.ConfigHelper.GetAppStrings("Host"); CJia.ClientConfig.ServerPort = int.Parse(CJia.PIVAS.Tools.ConfigHelper.GetAppStrings("Port")); CJia.ClientConfig.ClientNo = CJia.PIVAS.Tools.ConfigHelper.GetAppStrings("ClientNo"); CJia.ClientConfig.SystemNo = CJia.PIVAS.Tools.ConfigHelper.GetAppStrings("SystemNo"); checkAdviceModel = new CJia.PIVAS.Models.CheckAdviceModel(); }