//启用该条设备入出库管理 private void enable_toolStrip_Click(object sender, EventArgs e) { Dictionary <string, ObjItem> dr = this.dataGView1.getRowData(); if (dr != null) { if (WJs.confirm("您确定要启用选中的设备入出库记录吗?")) { if (dr["是否使用"].ToString() == "0") { ActionLoad ac = ActionLoad.Conn(); ac.Sql = "QiYong"; ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQInOutSvr"; ac.Add("CHOSCODE", His.his.Choscode.ToString()); ac.Add("IOID", dr["入出ID"].ToString()); ac.Add("IFUSE", "1"); ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad); ac.Post(); } else { WJs.alert("该设备入出库记录已经被启用,无需修改!"); } } } else { WJs.alert("请选择要启用的设备出入库类型记录!"); } }
//void ware_selTextInpt_TextChanged(object sender, EventArgs e) //{ // if (this.ware_selTextInpt.Value != null && this.ware_selTextInpt.Value != "") // { // if (this.ware_selTextInpt.Value.ToString() != preValue) // { // if (preValue != null) // { // if (WJs.confirm("更改出库库房将会删除所有细表信息,确认更改出库库房?")) // { // this.targetware_selTextInpt.Value = null; // this.targetware_selTextInpt.Text = null; // int K = this.dataGView1.Rows.Count; // for (int i = 0; i < K; i++) // { // this.dataGView1.Rows.Remove(this.dataGView1.Rows[0]); // } // } // else // { // this.ware_selTextInpt.Value = preValue; // this.ware_selTextInpt.Text = preText; // return; // } // } // preText = this.ware_selTextInpt.Text.ToString(); // preValue = this.ware_selTextInpt.Value.ToString(); // } // } //} //private void selTextInpt1_Leave(object sender, EventArgs e) //{ //} #endregion private void Cancel_toolStrip_Click(object sender, EventArgs e) { if (WJs.confirm("您确定要退出吗?")) { this.Close(); } }
private void del_toolStrip_Click(object sender, EventArgs e) { if (dataGView1.CurrentRow == null) { WJs.alert("请选择要删除的设备领用信息!"); } if (isFlag == 2) { dataGView1.Rows.Remove(dataGView1.CurrentRow); } if (isFlag == 1) { if (dataGView1.CurrentRow.Cells["Liushuihao_Column"].Value.ToString() != "" && dataGView1.CurrentRow.Cells["Liushuihao_Column"].Value != null) { if (WJs.confirm("您确定要删除选中的设备领用信息?针对原始数据的删除时不可恢复的!")) { if (LData.Exe("DeleteOutDetailInfoInEdit", null, new object[] { this.dataGView1.CurrentRow.Cells["Liushuihao_Column"].Value, His.his.Choscode }) == "") { WJs.alert("删除信息失败!"); return; } dataGView1.Rows.Remove(dataGView1.CurrentRow); } } else { dataGView1.Rows.Remove(dataGView1.CurrentRow); } } this.TotalMoney_textBox1.Text = this.dataGView1.Sum("金额").ToString(); }
void ac_ServiceLoad(object sender, YtClient.data.events.LoadEvent e)//成功返回函数 { //isOk = true; if (this.isAdd) { if (e.Msg.Msg.Equals("已经存在该设备项目信息!") || e.Msg.Msg.Equals("已经存在该设备项目信息,不能修改成该名称!")) { WJs.alert(e.Msg.Msg); //InitForm(); } else if (!WJs.confirm("保存成功,是否继续添加?")) { this.Close(); } else { InitForm(); } } else { WJs.alert(e.Msg.Msg); this.Close(); } }
private void cancel_toolStripButton_Click(object sender, EventArgs e) { if (WJs.confirm("是否放弃保存,暂存数据将清空!")) { InitInWare(); } }
void ac_ServiceLoad(object sender, YtClient.data.events.LoadEvent e) { WJs.alert(e.Msg.Msg); if (!isAdd || !WJs.confirm("是否继续添加物资信息?")) { WZDM.ReLoadData(TvList.getValue(this.ytComboBox_KindCode).ToString()); this.Close(); } else { this.ytComboBox_CountCode.SelectedIndex = -1; this.ytComboBox_ifUse.SelectedIndex = 0; this.ytComboBox_WORKUNITCODE.SelectedIndex = -1; this.selTextInpt_PRODUCTPLACE.Value = null; this.selTextInpt_PRODUCTPLACE.Text = null; this.ytComboBox_SingerCode.SelectedIndex = -1; this.ytComboBox_IFJL.SelectedIndex = -1; this.ytComboBox_ZJTYPE.SelectedIndex = -1; this.yTextBox_BM.Clear(); this.yTextBox_BMJM.Clear(); this.yTextBox_GuiG.Clear(); this.yTextBox_ZJRATE.Clear(); this.yTextBox_XH.Clear(); this.yTextBox_JC.Clear(); this.yTextBox_JM.Clear(); this.yTextBox_Name.Clear(); this.yTextBox_PY.Clear(); this.yTextBox_Rec.Clear(); this.yTextBox_TiaoXM.Clear(); this.yTextBox_WB.Clear(); this.yTextBox_EQID.Clear(); } }
void ac_ServiceLoad(object sender, YtClient.data.events.LoadEvent e) { WJs.alert(e.Msg.Msg); Main.ReLoadData(); if (!isAdd || !WJs.confirm("是否继续添加厂商信息?")) { isSc = true; this.Close(); } else { this.ytComboBox_IfAfford.SelectedIndex = -1; this.ytComboBox_IfMake.SelectedIndex = -1; this.ytComboBox_ifUse.SelectedIndex = 0; this.ytComboBox_Pperty.SelectedIndex = -1; this.yTextBox_Address.Clear(); this.yTextBox_Bank.Clear(); this.yTextBox_BANKACCOUNT.Clear(); this.yTextBox_Fax.Clear(); this.yTextBox_FRDB.Clear(); this.yTextBox_JYXKZ.Clear(); this.yTextBox_Name.Clear(); this.yTextBox_Phone.Clear(); this.yTextBox_POST.Clear(); this.yTextBox_PY.Clear(); this.yTextBox_QYDM.Clear(); this.yTextBox_Rec.Clear(); this.yTextBox_RELMAN.Clear(); this.yTextBox_SupplyID.Clear(); this.yTextBox_WB.Clear(); this.yTextBox_YYZZ.Clear(); this.yTextBox_SWDJH.Clear(); } }
private void Del_toolStrip_Click(object sender, EventArgs e) { Dictionary <string, ObjItem> dr = this.dataGView2.getRowData(); if (dr == null) { WJs.alert("请选择需要删除的设备使用信息!"); return; } if (dr != null) { if (dr["状态"].ToString() == "1") { if (WJs.confirm("您确认要删除该条设备使用信息吗?")) { LData.Exe("DeleteEQUseInfo_EQUseManag", null, new object[] { His.his.Choscode, dr["使用ID"].ToString() }); WJs.alert("删除成功!"); if (selTextInpt1.Text != "" && selTextInpt1.Value != "") { refresh_toolStrip_Click(null, null); } } } else { WJs.alert("无效的设备使用信息无需删除!"); } } }
//从最顶节点开始搜索 而当前节点就是顶级节点下的第一个节点 void FindNextNode() { if (CurrentPnode.Nodes.Count > 0) { CurrentPnode = CurrentPnode.Nodes[0]; } else { //若当前节点下再无子节点[末节点] CurrentPnode = GetUnderNode(CurrentPnode); if (CurrentPnode == null) { WJs.confirm("搜索完毕,没有发现新的符合项,将从头开始"); CurrentPnode = this.ytTreeView1.TopNode; return; } } DataRow row = this.ytTreeView1.GetRow(CurrentPnode); if (row[CurrentFindType].ToString().Contains(CurrentFindContent)) { this.ytTreeView1.SelectedNode = CurrentPnode; } else { FindNextNode(); } }
private void SubmitCheck_toolStrip_Click(object sender, EventArgs e) { //对状态为审核被拒(即“状态=2”)的出库数据进行提交审核操作,更改状态为1即可。 Dictionary <string, ObjItem> dr = this.dataGView1.getRowData(); if (dr != null) { if (dr["状态"].ToString() == "2") { if (WJs.confirm("您确定要将该条设备领用记录重新提交审核吗?")) { LData.Exe("UpdateLingYongStatus", null, new object[] { "1", DateTime.Now, His.his.Choscode.ToString(), dr["出库ID"].ToString() }); refresh_toolStrip_Click(null, null); } } else { WJs.alert("只能对处于审核被拒状态的设备领用记录进行提交审核操作"); } } else { WJs.alert("请选择要提交审核的设备领用记录!"); } }
private void Del_toolStrip_Click(object sender, EventArgs e) { //只能删除状态为1或2的领用数据 更改状态为0 Dictionary <string, ObjItem> dr = this.dataGView1.getRowData(); if (dr != null) { if (dr["状态"].ToString() == "1" || dr["状态"].ToString() == "2") { if (WJs.confirm("你确定要将该条设备领用信息作废?")) { LData.Exe("UpdateLingYongStatus", null, new object[] { "0", DateTime.Now, His.his.Choscode.ToString(), dr["出库ID"].ToString() }); refresh_toolStrip_Click(null, null); } } else { WJs.alert("只能将状态为等待审核以及审核被拒的设备领用记录作废!"); return; } } else { WJs.alert("请选择要删除的设备领用记录!"); } }
private void copy_toolStrip_Click(object sender, EventArgs e) { if (WJs.confirm("您确定要复制系统提供的出入库数据到本医疗机构吗?")) { ActionLoad ac = ActionLoad.Conn(); ac.Sql = "CopyChoscodeData"; ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQInOutSvr"; ac.Add("IOID", null); ac.Add("IONAME", null); ac.Add("PYCODE", null); ac.Add("WBCODE", null); ac.Add("IFUSE", null); ac.Add("RECIPECODE", null); ac.Add("RECIPELENGTH", null); ac.Add("RECIPEYEAR", null); ac.Add("RECIPEMONTH", null); ac.Add("MEMO", null); ac.Add("IOFLAG", null); ac.Add("OPFLAG", null); ac.Add("IFDEFAULT", null); ac.Add("RECDATE", null); ac.Add("USERID", His.his.UserId.ToString()); ac.Add("USERNAME", His.his.UserName); ac.Add("CHOSCODE", His.his.Choscode); ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad); ac.Post(); } }
private void button1_Click(object sender, EventArgs e) { if (this.countname_yTextBox.Text.Trim().Length == 0) { WJs.alert("请输入统计类别名称!"); return; } ActionLoad ac = ActionLoad.Conn(); ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQCountKindSvr"; if (isAdd) { ac.Sql = "Add"; } else { ac.Sql = "Modify"; } ac.Add("COUNTCODE", this.countcode_yTextBox.Text.Trim()); ac.Add("SUPERCODE", this.supercode_yTextBox.Text.Trim()); ac.Add("COUNTNAME", this.countname_yTextBox.Text.Trim()); ac.Add("PYCODE", this.pycode_yTextBox.Text.Trim()); ac.Add("WBCODE", this.wbcode_yTextBox.Text.Trim()); ac.Add("IFEND", this.ifend_ytComboBox.SelectedIndex); ac.Add("IFUSE", this.ifuse_ytComboBox.SelectedIndex); ac.Add("MEMO", this.memo_yTextBox.Text); ac.Add("USERID", His.his.UserId.ToString()); ac.Add("USERNAME", His.his.UserName); ac.Add("RECDATE", this.reedittime_yTextBox.Text); ac.Add("CHOSCODE", His.his.Choscode); ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad); ac.Post(); if (isOk) { if (isAdd) { if (!WJs.confirm("添加统计类别信息成功,是否继续添加?")) { this.Close(); } else { InitAddEQCountKind(); } } else { this.Close(); } } else { WJs.alert("保存设备统计类别信息失败!"); } }
void ac_ServiceLoad(object sender, YtClient.data.events.LoadEvent e) { WJs.alert(e.Msg.Msg); Main.ReLoadData(); if (!isAdd || !WJs.confirm("是否继续添加期间划分信息?")) { isSc = true; this.Close(); } else { this.yTextBox_Name.Text = this.ytDateTime_Start.Value.Year + "年" + this.ytDateTime_Start.Value.Month + "月"; //this.yTextBox_Name.Clear(); this.yTextBox_Rec.Clear(); } }
private void Chongxiao_toolStrip_Click(object sender, EventArgs e) { dataGView2.IsAutoAddRow = false; Dictionary <string, ObjItem> drZhu = this.dataGView1.getRowData(); if (drZhu != null) { //CXDATE CXUSERID CXUSERNAME if (drZhu["状态"].ToString() == "6") { if (WJs.confirm("确认对已审核的数据进行冲销操作?")) { //更改状态 是不是可以同时适应出库和入库呢? ActionLoad acChongXiao = ActionLoad.Conn(); acChongXiao.Action = "LKWZSVR.lkeq.WareManag.EQDiaoBoSvr"; acChongXiao.Sql = "ChongXiaoRuChu"; acChongXiao.Add("STATUS", "0"); acChongXiao.Add("CXUSERNAME", His.his.UserName.ToString()); acChongXiao.Add("CXUSERID", His.his.UserId.ToString()); acChongXiao.Add("CXDATE", DateTime.Now); acChongXiao.Add("OUTID", drZhu["出库ID"].ToString()); acChongXiao.Add("CHOSCODE", drZhu["医疗机构编码"].ToString()); acChongXiao.ServiceLoad += new YtClient.data.events.LoadEventHandle(acChongXiao_ServiceLoad); acChongXiao.Post(); //执行冲销操作 List <Dictionary <string, ObjItem> > drXiBiaoList = this.dataGView2.GetData(); ChongXiaoCaoZuo(drZhu, drXiBiaoList); } if (isOK2) { WJs.alert("冲销该条调拨记录成功!"); refresh_toolStrip_Click(null, null); } } else { WJs.alert("只能对状态为已审核的数据进行冲销操作!"); } } else { WJs.alert("请选择需要进行冲销操作的调拨信息!"); } }
void ac_ServiceLoad(object sender, YtClient.data.events.LoadEvent e) { WJs.alert(e.Msg.Msg); Main.ReLoadData(); if (!isAdd || !WJs.confirm("是否继续添加维修类别信息?")) { isSc = true; this.Close(); } else { this.ytComboBox_IfDefault.SelectedIndex = -1; this.ytComboBox_ifUse.SelectedIndex = 0; this.yTextBox_Name.Clear(); this.yTextBox_PY.Clear(); this.yTextBox_WB.Clear(); this.yTextBox_Rec.Clear(); } }
private void QiYong_toolStrip_Click(object sender, EventArgs e) { Dictionary <string, ObjItem> dr = this.dataGView1.getRowData(); if (dr == null || dr.Count == 0) { WJs.alert("请选择需要启用的设备卡片记录!"); return; } if (dr["状态"].ToString() == "1") { if (WJs.confirm("您确定要启用该条设备卡片记录么?")) { LData.Exe("UpdateCardInfoStatus", null, new object[] { "2", His.his.UserName, DateTime.Now, dr["卡片ID"].ToString(), His.his.Choscode.ToString() }); WJs.alert("执行成功!"); refresh_toolStrip_Click(null, null); } } else { WJs.alert("只能启用状态为未启用的设备卡片记录!"); } }
void ac_ServiceLoad(object sender, YtClient.data.events.LoadEvent e) { WJs.alert(e.Msg.Msg); AskB.ReLoadData(); if (!isAdd || !WJs.confirm("是否继续添加设备请购信息?")) { this.Close(); } else { this.yTextBox_QGID.Text = null; this.selTextInpt_QGKSID.Value = null; this.selTextInpt_QGKSID.Text = null; this.selTextInpt_EQID.Value = null; this.selTextInpt_EQID.Text = null; this.yTextBox_Name.Clear(); this.yTextBox_GuiG.Clear(); this.yTextBox_XH.Clear(); this.selTextInpt_Country.Text = "中国"; this.selTextInpt_Country.Value = null; this.ytComboBox_Unitcode.Value = null; this.ytComboBox_Unitcode.Text = null; this.yTextBox_QGNum.Clear(); this.yTextBox_YJPRICE.Clear(); this.yTextBox_YJMONEY.Clear(); this.yTextBox_REASON.Clear(); this.yTextBox_PTTJ.Clear(); this.yTextBox_XYFX.Clear(); this.yTextBox_Rec.Clear(); } }
private void SubmitCheck_toolStrip_Click(object sender, EventArgs e) { //对状态为审核被拒(即“状态=2”)的出库数据进行提交审核操作,更改状态为1即可。 Dictionary <string, ObjItem> dr = this.dataGView1.getRowData(); if (dr != null) { if (dr["状态"].ToString() == "2") { if (WJs.confirm("您确定要将该条审核被拒的数据提交审核吗?")) { ActionLoad ac = ActionLoad.Conn(); ac.Action = "LKWZSVR.lkeq.WareManag.EQDiaoBoSvr"; ac.Sql = "SubmitShenHeOrDel"; ac.Add("OUTID", dr["出库ID"].ToString()); ac.Add("CHOSCODE", dr["医疗机构编码"].ToString()); ac.Add("STATUS", "1"); ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad); ac.Post(); if (isOk) { WJs.alert("更改设备调拨状态信息成功!"); } refresh_toolStrip_Click(null, null); } } else { WJs.alert("只能对处于审核被拒状态的设备调拨记录进行提交审核操作"); } } else { WJs.alert("请选择要提交审核的设备调拨记录!"); } }
private void del_toolStrip_Click(object sender, EventArgs e) { Dictionary <string, ObjItem> dr = this.dataGView1.getRowData(); if (dr != null) { if (isFlag == 1) { if (dr["流水号"].IsNull == false && dr["流水号"].ToString() != "") { if (WJs.confirm("你确定要删除选中的设备调拨信息,针对原始数据的删除时不可恢复的!")) { if (LData.Exe("DeleteOutDetailInfoInEdit", null, new object[] { dr["流水号"].ToString(), His.his.Choscode }) == "") { WJs.alert("删除信息失败!"); return; } this.dataGView1.Rows.Remove(this.dataGView1.CurrentRow); } } else { this.dataGView1.Rows.Remove(this.dataGView1.CurrentRow); } } else { this.dataGView1.Rows.Remove(this.dataGView1.CurrentRow); } this.TotalMoney_textBox1.Text = this.dataGView1.Sum("金额").ToString(); } else { WJs.alert("请选择要删除的设备调拨信息!"); } }
private void Del_toolStrip_Click(object sender, EventArgs e) { // 删除:不能物理删除记录;只能删除状态为1或2的调拨数据;只需要将要删除的出库主表的状态设置为0即可。 Dictionary <string, ObjItem> dr = this.dataGView1.getRowData(); if (dr != null) { if (dr["状态"].ToString() == "1" || dr["状态"].ToString() == "2") { if (WJs.confirm("您确定要将该条设备调拨记录作废?")) { ActionLoad ac = ActionLoad.Conn(); ac.Action = "LKWZSVR.lkeq.WareManag.EQDiaoBoSvr"; ac.Sql = "SubmitShenHeOrDel"; ac.Add("OUTID", dr["出库ID"].ToString()); ac.Add("CHOSCODE", dr["医疗机构编码"].ToString()); ac.Add("STATUS", "0"); ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad); ac.Post(); if (isOk) { WJs.alert("更改设备调拨状态信息成功!"); } refresh_toolStrip_Click(null, null); } } else { WJs.alert("只能对处于等待审核以及审核被拒状态的设备调拨记录进行删除操作!"); } } else { WJs.alert("请选择要删除的设备调拨记录!"); } }
private void toolStripButton1_Click(object sender, EventArgs e)//审核 { DataRow r1 = this.dataGView1.GetRowData(); if (r1 != null) { if (r1["STATUS"].ToString() == "1") { if (WJs.confirm("审核是否通过?")) //审核通过 { dataGView1CellClick();//保证打taGview2 中有数据 if (this.dataGView2.GetData() != null) { foreach (Dictionary <string, ObjItem> dr in this.dataGView2.GetData()) { if (dr["库存流水号"].ToString().Trim().Length > 0) { if (dr["单价"].IsNull || dr["单价"].ToString().Trim() == "") { WJs.alert("流水号为" + dr["库存流水号"] + "的单价为空!"); return; } } else { break; } } //rowid = this.dataGView1.CurrentRow.Index; ActionLoad ac = ActionLoad.Conn(); ac.Action = "LKWZSVR.lkeq.EQWareManag.EQPanDianSvr"; ac.Sql = "ShenHeSucPD"; ac.Add("PDID", r1["PDID"]); ac.Add("CHOSCODE", His.his.Choscode); ac.Add("STATUS", "6"); ac.Add("SHUSERID", His.his.UserId); ac.Add("SHUSERNAME", His.his.UserName); ac.Add("WARECODE", r1["WARECODE"].ToString()); ac.Add("MEMO", r1["MEMO"].ToString()); ac.Add("CHOSCODE", His.his.Choscode); ac.Add("USERID", His.his.UserId); ac.Add("USERNAME", His.his.UserName); ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad_JieZhuang); ac.Post(); } else { WJs.alert("盘点细表中没有数据,不能结转!"); } } else//审核不通过 { ActionLoad ac = ActionLoad.Conn(); ac.Action = "LKWZSVR.lkeq.EQWareManag.EQPanDianSvr"; ac.Sql = "ShenHeLost"; ac.Add("PDID", r1["PDID"]); ac.Add("CHOSCODE", His.his.Choscode); ac.Add("STATUS", "2"); ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad_ShenHe); ac.ServiceFaiLoad += new YtClient.data.events.LoadFaiEventHandle(ac_ServiceFaiLoad); ac.Post(); } } else { WJs.alert("只能对状态为待审核的数据进行审核!"); } } else { WJs.alert("请选择要审核的盘点信息"); } }
private void Chongxiao_toolStrip_Click(object sender, EventArgs e) { dataGView2.IsAutoAddRow = false; Dictionary <string, ObjItem> drZhu = this.dataGView1.getRowData(); if (drZhu != null) { if (drZhu["对应入库ID"].IsNull == true || drZhu["对应入库ID"].ToString() == "") { WJs.alert("没有包含该条设备领用信息的入库信息,无法进行冲销操作!"); return; } if (drZhu["状态"].ToString() == "6") { if (WJs.confirm("确认对已审核的数据进行冲销操作?")) { //更改状态 是不是可以同时适应出库和入库呢? ActionLoad acCX = ActionLoad.Conn(); acCX.Action = "LKWZSVR.lkeq.WareManag.EQLingYongSvr"; acCX.Sql = "ChongXiaoRuChu"; acCX.Add("STATUS", "0"); acCX.Add("CXUSERNAME", His.his.UserName); acCX.Add("CXUSERID", His.his.UserId.ToString()); acCX.Add("CXDATE", DateTime.Now); acCX.Add("INID", drZhu["对应入库ID"].ToString()); acCX.Add("OUTID", drZhu["出库ID"].ToString()); acCX.Add("CHOSCODE", drZhu["医疗机构编码"].ToString()); acCX.ServiceLoad += new YtClient.data.events.LoadEventHandle(acCX_ServiceLoad); acCX.Post(); //执行冲销操作 List <Dictionary <string, ObjItem> > XBList = this.dataGView2.GetData(); ChongXiaoCaoZuo(drZhu, XBList); if (!isOK2) { WJs.alert("冲销失败!"); return; } //判断是否建卡?【循环细表内容】 foreach (Dictionary <string, ObjItem> item in XBList) { CXJKNum++; // SELECT FLOWNO,DEPTID,STOCKID,EQID FROM LKEQ.EQSTOCKDETAIL WHERE CARDNUM >= ? AND CHOSCODE=? AND FLOWNO=? DataTable cxCard = LData.LoadDataTable("IfHaveBuildCardInLingYong", null, new object[] { item["数量"].ToInt(), His.his.Choscode, item["库存流水号"].ToString() }); if (cxCard == null || cxCard.Rows.Count <= 0) { continue; } else { DataRow dr = cxCard.Rows[0];//只包含一行 if (WJs.confirm("该领用单上的第" + CXJKNum + "条数据,建立了卡片,是否要将卡片进行冲销?")) { //冲销掉对应的卡片 第一,减少对应的库存流水内的卡片数量;第二,在卡片表格内更改状态为7 //UPDATE LKEQ.EQSTOCKDETAIL SET CARDNUM=CARDNUM-? WHERE FLOWNO=? AND CHOSCODE=? //UPDATE LKEQ.EQCARDREC SET STATUS=7 //WHERE CARDID IN ( SELECT CARDID FROM (SELECT * FROM LKEQ.EQCARDREC //WHERE STOCKID=? AND STOCKFLOWNO=? AND DEPTID=? ORDER BY CARDID DESC) WHERE ROWNUM<=?) isHaveCard = true; LData.Exe("ChongXiaoKaPianNumLingYong", null, new object[] { item["数量"].ToInt(), dr["FLOWNO"].ToString(), His.his.Choscode }); //LData.Exe("ChongXiaoKaPianInLingYong", null, new object[] { dr["STOCKID"].ToString(), dr["FLOWNO"].ToString(), dr["DEPTID"].ToString(), His.his.Choscode, dr["EQID"].ToString(), item["数量"].ToInt() }); LData.Exe("ChongXiaoKaPianInLingYong", null, new object[] { dr["STOCKID"].ToString(), dr["FLOWNO"].ToString(), drZhu["出库目的科室ID"].ToString(), His.his.Choscode, dr["EQID"].ToString(), item["数量"].ToInt() }); } } } if (isHaveCard) { WJs.alert("卡片冲销成功!"); } } if (isOK2) { WJs.alert("冲销该条调拨记录成功!"); refresh_toolStrip_Click(null, null); } } else { WJs.alert("只能对状态为已审核的数据进行冲销操作!"); } } else { WJs.alert("请选择需要进行冲销操作的调拨信息!"); } }
private void btnSave_Click(object sender, EventArgs e) { if (this.warename_yTextBox1.Text.Trim().Length == 0) { WJs.alert("请输入库房名称!"); warename_yTextBox1.Focus(); return; } if (this.selTextInpt1.Value == "" || selTextInpt1.Text == "") { WJs.alert("请输入科室!"); selTextInpt1.Focus(); return; } if (this.ifall_ytComboBox.SelectedIndex < 0) { WJs.alert("请选择是否管理所有设备类别!"); ifall_ytComboBox.Focus(); return; } if (this.ifuse_ytComboBox.SelectedIndex < 0) { WJs.alert("请设置设备是否使用!"); ifuse_ytComboBox.Focus(); return; } ActionLoad ac = ActionLoad.Conn(); ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQWare"; //执行保存操作 ac.Sql = "Save"; AddEQWareInfoForSave(ac); ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad); ac.Post(); if (isOK) { // if (!this.isAdd) if (isFlag == 1) { wd = dr["库房编码"].ToString(); } //是否管理所有设备类别 if (this.ifall_ytComboBox.SelectedItem.ToString() == "否") { //wd is kindcode //SetEQDetail form = new SetEQDetail(null, dr, wd); //form.Main = this.Main; SetEQDetail form = new SetEQDetail(dr, wd); form.ShowDialog(); } if (isFlag == 1) { WJs.alert("修改成功!"); this.Close(); } if (isFlag == 2) { if (!WJs.confirm("保存成功,是否继续添加?")) { this.Close(); } else { InitForm(); } } else { this.Close();//修改完之后关闭 } } else { WJs.alert("保存设备库房信息失败!"); } }