Пример #1
0
        private void toolStripButton_Del_Click(object sender, EventArgs e)
        {
            DataRow row = this.dataGView1.GetRowData();

            if (row != null)
            {
                if (WJs.confirmFb("确定要删除选择的盘点详细信息吗?"))
                {
                    this.dataGView1.SelectedRows[0].Cells["Column9"].Value = null;
                    this.dataGView1.SelectedRows[0].Cells["Column2"].Value = this.dataGView1.SelectedRows[0].Cells["Column12"].Value;

                    if (!isAdd && r["PDID"] != null)
                    {
                        ActionLoad ac = ActionLoad.Conn();
                        ac.Action = "LKWZSVR.lkeq.EQWareManag.EQPanDianSvr";
                        ac.Sql    = "DelEQPanDianDetailInfo";
                        ac.Add("PDID", r["PDID"].ToString());
                        ac.Add("ROWNO", Convert.ToDecimal(row["ROWNO"]));
                        ac.Add("CHOSCODE", His.his.Choscode);
                        ac.ServiceLoad    += new YtClient.data.events.LoadEventHandle(ac_ServiceDetailDeleteLoad);
                        ac.ServiceFaiLoad += new YtClient.data.events.LoadFaiEventHandle(ac_ServiceFaiLoad);
                        ac.Post();
                    }
                }
            }
            else
            {
                WJs.alert("请选择要删除的盘点信息");
            }
        }
Пример #2
0
        private void toolStripButton_Submit_Click(object sender, EventArgs e)
        {
            DataRow r1 = this.dataGView1.GetRowData();

            if (r1 != null)
            {
                if (WJs.confirmFb("确定要提交选择的盘点信息吗?"))
                {
                    if (r1["STATUS"].ToString() == "2")
                    {
                        rowid = this.dataGView1.CurrentRow.Index;

                        if (this.dataGView1[1, rowid].Value == null || this.dataGView1[1, rowid].Value.ToString().Trim().Length <= 0)//判断是否为最后一行
                        {
                            rowid = 0;
                        }
                        ActionLoad ac = ActionLoad.Conn();
                        ac.Action = "LKWZSVR.lkeq.EQWareManag.EQPanDianSvr";
                        ac.Sql    = "SubmitEQPD";
                        ac.Add("PDID", r1["PDID"]);
                        ac.Add("CHOSCODE", His.his.Choscode);
                        ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
                        ac.Post();
                    }
                    else
                    {
                        WJs.alert("状态错误,只能提交状态为审核被拒的数据!");
                    }
                }
            }
            else
            {
                WJs.alert("请选择要提交的盘点信息");
            }
        }
Пример #3
0
        private void toolStripButton3_Click(object sender, EventArgs e)//删除
        {
            DataRow r7 = this.dataGView_Main.GetRowData();

            if (r7 != null)
            {
                if (WJs.confirmFb("确定要删除选择的设备信息吗?\n删除后不能恢复!"))
                {
                    rowid = this.dataGView_Main.CurrentRow.Index;
                    ActionLoad ac = ActionLoad.Conn();
                    ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQDictSvr";
                    ac.Sql    = "DelEQDictInfo";
                    ac.Add("EQID", r7["EQID"]);
                    ac.Add("IFUSE", r7["IFUSE"]);
                    ac.Add("CHOSCODE", His.his.Choscode);
                    ac.Add("flag", "0");
                    ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
                    ac.Post();
                }
            }
            else
            {
                WJs.alert("请选择要删除的设备信息");
            }
        }
Пример #4
0
        //启用该条设备入出库管理
        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("请选择要启用的设备出入库类型记录!");
            }
        }
Пример #5
0
        private void QueRen_toolStrip_Click(object sender, EventArgs e)
        {
            if (dataGView1.RowCount <= 0)
            {
                WJs.alert("当前折旧细表内无数据,不能进行月结信息!");
                return;
            }
            //确认的时候先保存折旧记录  然后更新对应的数据
            string     XmlData = this.dataGView1.GetDataToXml();
            ActionLoad ac      = ActionLoad.Conn();

            ac.Action = "LKWZSVR.lkeq.UseingEQ.EQMonthAccountSvr";
            ac.Sql    = "QueRenYueJie";
            ac.Add("XmlDataList", XmlData);
            ac.Add("BEGINDATE", drZ["开始日期"].ToDateTime());
            ac.Add("ENDDATE", drZ["结束日期"].ToDateTime());
            AddZhuBiaoInfo(ac);
            ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
            ac.Post();
            if (isOk)
            {
                WJs.alert("月结成功,即将关闭本窗口!");
                this.Close();
            }
        }
Пример #6
0
        private void toolStripButton6_Click(object sender, EventArgs e)//提交
        {
            DataRow r = this.dataGView_Main.GetRowData();

            if (r != null)
            {
                if (WJs.confirmFb("是否提交?"))
                {
                    if (r["STATUS"].ToString() == "2")
                    {
                        rowid = this.dataGView_Main.CurrentRow.Index;
                        ActionLoad ac = ActionLoad.Conn();
                        ac.Action = "LKWZSVR.lkeq.EQPurchase.EQAskBuySvr";
                        ac.Sql    = "Submit_EQAskBuyInfo";
                        ac.Add("APPLYID", r["APPLYID"]);
                        ac.Add("CHOSCODE", His.his.Choscode);
                        ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
                        ac.Post();
                    }
                    else
                    {
                        WJs.alert("状态错误,只能对状态为审核被拒的数据进行再次提交!");
                    }
                }
            }
            else
            {
                WJs.alert("请选择要提交的请购信息!");
            }
        }
Пример #7
0
        private void toolStripButton3_Click(object sender, EventArgs e)//删除
        {
            Dictionary <string, ObjItem> dr = this.dataGView1.getRowData();

            if (dr != null)
            {
                if (dr["医疗机构编码"].ToString() != His.his.Choscode)
                {
                    WJs.alert("不能删除不属于本医疗机构的厂商信息!");
                    return;
                }
                else if (WJs.confirmFb("确定要删除选择的厂商信息吗?\n删除后不能恢复!"))
                {
                    rowid = this.dataGView1.CurrentRow.Index;
                    ActionLoad ac = ActionLoad.Conn();
                    ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQSupplySvr";
                    ac.Sql    = "EQDelChangShangInfo";
                    ac.Add("SUPPLYID", dr["厂商ID"].ToInt());
                    ac.Add("CHOSCODE", His.his.Choscode);
                    ac.Add("IFUSE", dr["是否使用"].ToString());
                    ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
                    ac.Post();
                }
            }
            else
            {
                WJs.alert("请选择要删除的厂商信息!");
            }
        }
Пример #8
0
        private void Submit_toolStripButton_Click(object sender, EventArgs e) //提交
        {
            Dictionary <string, ObjItem> dr = this.dataGView1.getRowData();

            if (dr != null)
            {
                if (dr["状态"].ToInt() == 2)
                {
                    ActionLoad ac = new ActionLoad();
                    ac.Action = "LKWZSVR.lkeq.EQPurchase.EQPurchasePlanSvr";
                    ac.Sql    = "PlanDanUpdata_Submit";
                    ac.Add("PLANID", dr["采购计划ID"].ToString());
                    ac.Add("STATUS", 1);
                    ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
                    ac.Post();
                    Search_button_Click(null, null);
                }
                if (dr["状态"].ToInt() == 0)
                {
                    WJs.alert("该计划已删除,不能提交!");
                }
                if (dr["状态"].ToInt() == 1)
                {
                    WJs.alert("该计划已是等待审核,不需提交!");
                }
                if (dr["状态"].ToInt() == 6)
                {
                    WJs.alert("该计划已审核,不需再提交!");
                }
            }
            else
            {
                WJs.alert("请选择要提交的采购计划信息!");
            }
        }
Пример #9
0
        private void Enable_toolStripButton_Click(object sender, EventArgs e)
        {
            Dictionary <string, ObjItem> dr = this.dataGView1.getRowData();

            if (dr != null)
            {
                if (dr["是否使用"].ToString() == "0")
                {
                    ActionLoad ac = ActionLoad.Conn();
                    ac.Sql    = "QiYong";
                    ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQStatusSvr";
                    ac.Add("STATUSCODE", dr["状态编码"].ToString());
                    ac.Add("CHOSCODE", dr["医疗机构编码"].ToString());
                    ac.Add("IFUSE", "1");
                    ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
                    ac.Post();
                }
                else
                {
                    WJs.alert("该设备状态已经为启用状态,无需更改!");
                }
            }
            else
            {
                WJs.alert("请选择需要启用的设备状态信息!");
            }
        }
Пример #10
0
        private void UsetoolStripButton_Click(object sender, EventArgs e)
        {
            Dictionary <string, ObjItem> dr = this.dataGView1.getRowData();

            if (dr != null)
            {
                if (dr["是否使用"].ToString() == "0")
                {
                    if (WJs.confirmFb("您确定要启用选择的设备库房吗?"))
                    {
                        ActionLoad ac = ActionLoad.Conn();
                        ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQWare";
                        ac.Sql    = "Enab";
                        ac.Add("ifuse", "1");
                        ac.Add("choscode", His.his.Choscode.ToString());
                        ac.Add("warecode", dr["库房编码"].ToString());

                        ac.SetKeyValue("warecode,choscode");
                        ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
                        ac.Post();
                        reLoad();
                    }
                }
                else
                {
                    WJs.alert("该设备库房已经启用了");
                }
            }
            else
            {
                WJs.alert("请选择要启用的设备库房信息!");
            }
        }
Пример #11
0
        private void toolStripButton6_Click(object sender, EventArgs e)//启用
        {
            Dictionary <string, ObjItem> dr = this.dataGView1.getRowData();

            if (dr != null)
            {
                if (dr["医疗机构编码"].ToString() != His.his.Choscode)
                {
                    WJs.alert("只能启用属于本医疗机构的厂商信息!");
                }
                else if (WJs.confirmFb("是否启用?"))
                {
                    rowid = this.dataGView1.CurrentRow.Index;
                    ActionLoad ac = ActionLoad.Conn();
                    ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQSupplySvr";
                    ac.Sql    = "StartWZSupplyInfo";
                    ac.Add("SUPPLYID", dr["厂商ID"].ToInt());
                    ac.Add("CHOSCODE", His.his.Choscode);
                    ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
                    ac.Post();
                }
            }
            else
            {
                WJs.alert("请选择要停用的厂商信息");
            }
        }
Пример #12
0
        private void Enable_toolStripButton_Click(object sender, EventArgs e)
        {
            //针对启用
            DataRow dr = this.ytTreeView1.getSelectRow();

            if (dr != null)
            {
                if (dr["IFUSE"].ToString() == "0")
                {
                    if (WJs.confirmFb("您确定要启用选择的统计类别信息吗?"))
                    {
                        ActionLoad ac = ActionLoad.Conn();
                        ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQCountKindSvr";
                        ac.Sql    = "QiYong";
                        ac.Add("IFUSE", "1");
                        ac.Add("CHOSCODE", His.his.Choscode.ToString());
                        ac.Add("COUNTCODE", dr["COUNTCODE"]);
                        ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
                        ac.Post();
                    }
                }
                else
                {
                    WJs.alert("该统计类别信息已经启用了!");
                }
            }
            else
            {
                WJs.alert("请选择要启用的统计类别信息!");
            }
        }
Пример #13
0
        private void toolStripButton7_Click(object sender, EventArgs e)//停用
        {
            DataRow r = this.ytTreeView1.getSelectRow();

            if (r != null)
            {
                if (WJs.confirmFb("是否停用?"))
                {
                    tr = this.ytTreeView1.SelectedNode.Text;
                    string[] str = tr.Split('|');
                    tr = str[0];
                    tr = tr.Trim();
                    ActionLoad ac = ActionLoad.Conn();
                    ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQKind";
                    ac.Sql    = "StopEQKindInfo";
                    ac.Add("KINDCODE", r["KINDCODE"]);
                    ac.Add("CHOSCODE", His.his.Choscode);
                    ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
                    ac.Post();
                }
            }
            else
            {
                WJs.alert("请选择要停用的设备类别");
            }
        }
Пример #14
0
        private void DeleButton_Click(object sender, EventArgs e)//删除
        {
            Dictionary <string, ObjItem> dr = this.dataGView1.getRowData();

            if (dr != null)
            {
                if (WJs.confirmFb("您确定要删除选择的设备项目单位信息吗?"))
                {
                    ActionLoad ac = ActionLoad.Conn();
                    ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQUnit";
                    // ac.Action = "Save";
                    ac.Sql = "Del";
                    //ac.Sql = "DelWZInfo";

                    // ac.Add("choscode", His.his.Choscode.ToString());
                    ac.Add("UNITCODE", dr["DICID"].ToString());
                    ac.Add("LSUNITCODE", dr["DICID"].ToString());
                    ac.Add("DICID", dr["DICID"].ToString());
                    ac.Add("DICGRPID", dr["字典组类别"].ToString());
                    //ac.SetKeyValue("choscode,warecode");

                    ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
                    ac.Post();
                    //reLoad(); //刷新表格数据
                    Search_button_Click(null, null);
                }
            }
            else
            {
                WJs.alert("请选择要删除的设备项目单位信息!");
            }
        }
Пример #15
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            Dictionary <string, ObjItem> dr = this.dataGView1.getRowData();

            if (dr != null)
            {
                if (WJs.confirmFb("你确定要删除选择的设备类别吗?"))
                {
                    decimal isusekindcode = Convert.ToDecimal(LData.Es("IsUseEQKindCode", null, new object[] { dr["类别编码"].ToString(), this.warecode_yTextBox.Text }));
                    if (isusekindcode > 0)
                    {
                        WJs.alert("该类别已被使用,不能删除!");
                        return;
                    }
                    ActionLoad ac = ActionLoad.Conn();
                    ac.Action = "LKWZSVR.lkeq.JiChuDictionary.SetEQManagKind";
                    ac.Sql    = "Delete";
                    ac.Add("CHOSCODE", dr["医疗机构编码"].ToString());
                    ac.Add("WARECODE", this.warecode_yTextBox.Text);
                    ac.Add("KINDCODE", dr["类别编码"].ToString());
                    ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
                    ac.Post();
                }
            }
            else
            {
                WJs.alert("请选择要删除的设备类别信息");
            }
        }
Пример #16
0
 private void toolStrip_JDNo_Click(object sender, EventArgs e)
 {
     ActionLoad ac = ActionLoad.Conn();
     ac.Action = "LKWZSVR.lkeq.UseingEQ.EQKeepAccountsManagSvr";
     ac.Add("NOID", NOID_textBox.Text.Trim().ToString());
     ac.Sql = "JDNo";
     ac.Add("STATUS", 2);
     ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
     ac.Post();
 }
Пример #17
0
        private void DeleButton_Click(object sender, EventArgs e)
        {
            Dictionary <string, ObjItem> doc = this.dataGView1.getRowData();

            if (doc != null)
            {
                if (doc["设备"].IsNull)
                {
                    this.dataGView1.Rows.Remove(this.dataGView1.CurrentRow);
                }
                else
                {
                    if (WJs.confirmFb("您确定要删除选择的出库设备信息吗?"))
                    {
                        this.dataGView1.Rows.Remove(this.dataGView1.CurrentRow);

                        this.dataGView1.jsBds("金额=数量*单价");
                        this.dataGView1.jsBds("运杂率=原运杂费/(入库数-出库数");
                        this.dataGView1.jsBds("运杂费=运杂率*数量");
                        this.dataGView1.jsBds("成本单价=单价+运杂费/数量");
                        this.dataGView1.jsBds("成本金额=成本单价*数量");
                        ////统计金额
                        this.totalmoney_yTextBox.Text = dataGView1.Sum("金额").ToString();

                        if (!doc["流水号"].IsNull && !doc["流水号"].ToString().Equals(""))
                        {
                            //数据库中已经存在该记录,需要删除数据库中的记录

                            ActionLoad ac = new ActionLoad();
                            ac.Action = "LKWZSVR.lkeq.EQWareManag.EQOutSvr";
                            ac.Sql    = "ChuKuDanEQdelete";
                            ac.Add("DETAILNO", doc["流水号"].ToString());
                            //ac.Add("WZID", doc["物资ID"].ToString());
                            //获取入库ID
                            string inwareid = LData.Es("EQGetInWareId", null, new object[] { doc["流水号"].ToString() });

                            ac.Add("OUTID", inwareid);


                            ac.Add("TOTALMONEY", this.totalmoney_yTextBox.Text);

                            ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac2_ServiceLoad);
                            ac.Post();
                        }
                    }
                }
            }
            else
            {
                WJs.alert("请选择需要删除的行!");
            }
        }
Пример #18
0
        private void button_SB_Click(object sender, EventArgs e)
        {
            ActionLoad ac = ActionLoad.Conn();

            ac.Action = "LKWZSVR.lkeq.EQPurchase.EQAskBuySvr";
            ac.Sql    = "EQAskBuyInfo_SHSB";
            ac.Add("APPLYID", r["APPLYID"]);
            ac.Add("CHOSCODE", His.his.Choscode);
            ac.Add("RECDATE", this.ytDateTime_RECDATE.Value);
            ac.ServiceLoad    += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad_SH);
            ac.ServiceFaiLoad += new YtClient.data.events.LoadFaiEventHandle(ac_ServiceFaiLoad);
            ac.Post();
        }
Пример #19
0
 //stockid, warecode, deptid, eqid, num, unitcode, memo, choscode
 //库存主表  针对每一条入库细表信息,分别做一次判断 EQID 8    这里的drZ仍是指出库主表
 private void AddEQStockMainInfo(ActionLoad ac, Dictionary <string, ObjItem> drX, Dictionary <string, ObjItem> drZ)
 {
     //SELECT STOCKID,NUM FROM LKEQ.EQSTOCK  WHERE EQID=? AND WARECODE=? AND CHOSCODE=?
     GetStockIdAndNum = LData.LoadDataTable("IfHaveExistInEQStock", null, new object[] { drX["设备ID"].ToString(), drZ["出库目的库房"].ToString(), His.his.Choscode });
     if (GetStockIdAndNum == null || GetStockIdAndNum.Rows.Count <= 0)
     {
         //不存在 需插入
         ifHaveExsit = false;
         ac.Add("STOCKID", "");                        //服务端生成
         ac.Add("WARECODE", drZ["出库目的库房"].ToString()); //入库主表的入库库房编码=出库主表的目的库房编码
         ac.Add("EQID", drX["设备ID"].ToString());
         ac.Add("DEPTID", TargetWareDeptid);
         ac.Add("CHOSCODE", His.his.Choscode);
         ac.Add("UNITCODE", drX["单位编码"].ToString());
         ac.Add("MEMO", "");
         ac.Add("NUM", drX["数量"].ToString());
         BeforeNum = 0;
     }
     else
     {
         //存在  需更新库存数目 []
         ifHaveExsit = true;
         BeforeNum   = Convert.ToInt32(GetStockIdAndNum.Rows[0][1].ToString());//出库目的库房的库存总表更新
         LData.Exe("UpdateEQStockNumForTarget", null, new object[] { Convert.ToInt32(drX["数量"].ToString()), drX["设备ID"].ToString(), drZ["出库目的库房"].ToString(), His.his.Choscode.ToString() });
     }
 }
Пример #20
0
        private void toolStripButton_Down_Click(object sender, EventArgs e)
        {
            ActionLoad ac = new ActionLoad();

            ac.Action = "LKWZSVR.lkeq.EQWareManag.EQOutSvr";
            ac.Sql    = "ChuKuDanUpdate";
            ac.Add("SHDATE", DateTime.Now);
            ac.Add("STATUS", 2);
            ac.Add("OUTID", dr["出库ID"].ToString());
            ac.Add("SHUSERID", His.his.UserId.ToString());
            ac.Add("SHUSERNAME", His.his.UserName);
            ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad_SHBTG);
            ac.Post();
        }
Пример #21
0
        void ac3_ServiceLoad(object sender, YtClient.data.events.LoadEvent e)
        {
            //更新入库细表的库存流水号
            string     flowno   = e.Msg.Msg.Split('+')[0];
            string     DETAILNO = e.Msg.Msg.Split('+')[1];
            ActionLoad ac2      = new ActionLoad();

            ac2.Action = "LKWZSVR.lkeq.EQWareManag.EQInSvr";
            ac2.Sql    = "UpdateEQInDetailInfo";
            ac2.Add("DETAILNO", DETAILNO);
            ac2.Add("STOCKFLOWNO", flowno);
            ac2.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac0_ServiceLoad);
            ac2.Post();
        }
Пример #22
0
        /// <summary>
        /// 检查发票是否正确
        /// </summary>
        /// <param name="fptype">票据类型: 1-门诊  2-住院</param>
        /// <param name="fpcode">发票号</param>
        /// <returns>true or false</returns>
        public static Boolean checkMZFP(short fptype, ref string fpcode)
        {
            ActionLoad pdac = ActionLoad.Conn();

            pdac.Action = "LKWZSVR.his.sys.FPop";
            pdac.Sql    = "PDinvoice";
            pdac.Add("choscode", His.his.Choscode);
            pdac.Add("kind", fptype);
            pdac.Add("fpcode", fpcode);
            pdac.Add("userid", His.his.UserId);
            ServiceMsg rMsg = pdac.Post();

            fpcode = rMsg.GetValue();
            return(rMsg.Msg.Equals("ok"));
        }
Пример #23
0
 private void AddZhuBiaoInfo(ActionLoad ac)
 {
     ac.Add("DEPREID", "");
     ac.Add("DEPTID", null);
     ac.Add("DEPRETYPE", ZJType_ComboBox.Value);
     ac.Add("DATEID", DateId_selTextInp.Value);
     ac.Add("MEMO", Memo_textBox.Text);
     ac.Add("STATUS", "1");//因为只能是有效
     ac.Add("USERID", His.his.UserId.ToString());
     ac.Add("USERNAME", His.his.UserName.ToString());
     ac.Add("CHOSCODE", His.his.Choscode);
 }
Пример #24
0
 private void toolStripButton_No_Click(object sender, EventArgs e)//审核不通过
 {
     if (WJs.confirmFb("是否审核不通过吗?"))
     {
         ActionLoad ac = new ActionLoad();
         ac.Action = "LKWZSVR.lkeq.EQPurchase.EQPurchasePlanSvr";
         ac.Sql    = "PlanDanUpdate_SH";
         ac.Add("SHDATE", DateTime.Now);
         ac.Add("STATUS", 2);
         ac.Add("PLANID", dr["采购计划ID"].ToString());
         ac.Add("SHUSERID", His.his.UserId.ToString());
         ac.Add("SHUSERNAME", His.his.UserName);
         ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad_Return);
         ac.Post();
     }
 }
Пример #25
0
        private void DeleButton_Click(object sender, EventArgs e)//删除
        {
            Dictionary <string, ObjItem> dr = this.dataGView1.getRowData();

            if (dr != null)
            {
                if (dr["状态"].ToInt() == 1 || dr["状态"].ToInt() == 2)
                {
                    ActionLoad ac = new ActionLoad();
                    ac.Action = "LKWZSVR.lkeq.EQPurchase.EQPurchasePlanSvr";
                    ac.Sql    = "EQPurchasePlanDelete";
                    ac.Add("PLANID", dr["采购计划ID"].ToString());
                    ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
                    ac.Post();
                    Search_button_Click(null, null);
                    // WJs.alert("删除采购计划id=" + dr["采购计划id"].ToString() + "成功!");
                }
                if (dr["状态"].ToInt() == 0)
                {
                    WJs.alert("该计划已删除,不能再次删除!");
                }

                if (dr["状态"].ToInt() == 6)
                {
                    WJs.alert("该计划已审核,不能删除!");
                }
            }
            else
            {
                WJs.alert("请选择要删除的采购计划信息!");
            }
        }
Пример #26
0
        private void toolStripButton1_Click(object sender, EventArgs e)//复制
        {
            ActionLoad ac = ActionLoad.Conn();

            ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQKind";
            ac.Sql    = "CopyEQKindInfo";
            ac.Add("CHOSCODE", His.his.Choscode);
            ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
            ac.Post();
        }
Пример #27
0
        private void Save_toolStrip_Click(object sender, EventArgs e)
        {
            dataGView1.IsAutoAddRow       = false;
            this.TotalMoney_textBox1.Text = this.dataGView1.Sum("金额").ToString();
            if (!XinXiYanZheng())
            {
                return;
            }
            TargetDEptid = LData.Es("GetTargetDeptIdByTargetWare", null, new object[] { targetware_selTextInpt.Value.ToString(), His.his.Choscode });

            ActionLoad acZhu = ActionLoad.Conn();

            acZhu.Action = "LKWZSVR.lkeq.WareManag.EQDiaoBoSvr";
            acZhu.Sql    = "ModifyZhuOrAdd";
            if (isFlag == 1)
            {
                acZhu.Add("OUTID", drmain["出库ID"].ToString());
            }
            if (isFlag == 2)
            {
                acZhu.Add("OUTID", "");
            }
            AddZhuBiaoInfo(acZhu);

            string XiInfoXml = this.dataGView1.GetDataToXml();

            if (XiInfoXml != "" && XiInfoXml != null)
            {
                acZhu.Add("XiBiaoInfo", XiInfoXml);
                acZhu.ServiceLoad += new YtClient.data.events.LoadEventHandle(acXi_ServiceLoad);
                acZhu.Post();
            }
            else
            {
                WJs.alert("细表内无数据,请填写数据后保存!");
            }

            if (isOK)
            {
                WJs.alert("保存设备调拨信息成功,即将关闭本窗口……");
                this.Close();
            }
        }
Пример #28
0
        void EQIDBind()
        {
            ActionLoad acEQID = ActionLoad.Conn();

            acEQID.Action = "LKWZSVR.lkeq.WareManag.EQDiaoBoSvr";
            acEQID.Sql    = "BindEQIDInfo";
            acEQID.Add("CHOSCODE", His.his.Choscode);
            acEQID.ServiceLoad += new YtClient.data.events.LoadEventHandle(acEQID_ServiceLoad);
            acEQID.Post();
        }
Пример #29
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            if (this.kindcode_selTextInpt.Text.Trim().Length == 0)
            {
                WJs.alert("请输入类别编码!");
                this.kindcode_selTextInpt.Focus();
                return;
            }

            ActionLoad ac = ActionLoad.Conn();

            ac.Action = "LKWZSVR.lkeq.JiChuDictionary.SetEQManagKind";
            ac.Sql    = "Save";
            ac.Add("WARECODE", this.warecode_yTextBox.Text);
            ac.Add("CHOSCODE", this.choscode_yTextBox.Text);
            ac.Add("KINDCODE", this.kindcode_selTextInpt.Value);
            ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
            ac.Post();
        }
Пример #30
0
        private void DeleButton_Click(object sender, EventArgs e)
        {
            Dictionary <string, ObjItem> doc = this.dataGView1.getRowData();

            if (doc != null)
            {
                if (doc["设备名称"].IsNull)
                {
                    this.dataGView1.Rows.Remove(this.dataGView1.CurrentRow);
                }
                else
                {
                    if (WJs.confirmFb("您确定要删除选择的采购设备信息吗?"))
                    {
                        this.dataGView1.Rows.Remove(this.dataGView1.CurrentRow);
                        this.dataGView1.jsBds("采购金额=采购数量*采购单价");
                        ////统计金额
                        this.totalmoney_yTextBox.Text = dataGView1.Sum("采购金额").ToString("0.0000");

                        if (!doc["行号"].IsNull && !doc["行号"].ToString().Equals(""))
                        {
                            //数据库中已经存在该记录,需要删除数据库中的记录

                            ActionLoad ac = new ActionLoad();
                            ac.Action = "LKWZSVR.lkeq.EQPurchase.EQPurchasePlanSvr";
                            ac.Sql    = "PlanDanEQdelete";
                            ac.Add("ROWNO", doc["行号"].ToString());
                            ac.Add("PLANID", doc["采购计划ID"].ToString());

                            ac.Add("TOTALMONEY", this.totalmoney_yTextBox.Text);

                            ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac2_ServiceLoad);
                            ac.Post();
                        }
                    }
                }
            }
            else
            {
                WJs.alert("请选择需要删除的行!");
            }
        }