Exemplo n.º 1
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("请选择要删除的设备项目单位信息!");
            }
        }
Exemplo n.º 2
0
 private void btn_Cancel_Click(object sender, EventArgs e)
 {
     if (WJs.confirmFb("是否确定退出新增?"))
     {
         this.Close();
     }
 }
Exemplo n.º 3
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("请选择要删除的设备类别信息");
            }
        }
Exemplo n.º 4
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("请选择要提交的盘点信息");
            }
        }
Exemplo n.º 5
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("请选择要提交的请购信息!");
            }
        }
Exemplo n.º 6
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("请选择要删除的厂商信息!");
            }
        }
Exemplo n.º 7
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("请选择要启用的设备库房信息!");
            }
        }
Exemplo n.º 8
0
 private void button_Cancel_Click(object sender, EventArgs e)
 {
     if (WJs.confirmFb("是否确定不在请购单中选择而直接退出?"))
     {
         this.Close();
     }
 }
Exemplo n.º 9
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("请选择要停用的厂商信息");
            }
        }
Exemplo n.º 10
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("请选择要停用的设备类别");
            }
        }
Exemplo n.º 11
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("请选择要启用的统计类别信息!");
            }
        }
Exemplo n.º 12
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("请选择要删除的盘点信息");
            }
        }
Exemplo n.º 13
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("请选择要删除的设备信息");
            }
        }
Exemplo n.º 14
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("请选择需要删除的行!");
            }
        }
Exemplo n.º 15
0
 private void toolStripButton_Cancel_Click(object sender, EventArgs e)
 {
     if (!this.isScan)
     {
         if (WJs.confirmFb("是否确定不保存退出?"))
         {
             this.Close();
         }
     }
     else
     {
         this.Close();
     }
 }
Exemplo n.º 16
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();
     }
 }
Exemplo n.º 17
0
        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            DataRow r1 = this.dataGView1.GetRowData();

            if (r1 != null)
            {
                if (WJs.confirmFb("确定要删除选择的盘点信息吗?"))
                {
                    if (r1["STATUS"].ToString() == "1")
                    {
                        if (this.dataGView1.RowCount == this.dataGView1.CurrentRow.Index + 1)
                        {
                            rowid = 0;
                        }
                        else
                        {
                            rowid = this.dataGView1.CurrentRow.Index;
                        }
                        // rowid =rowid+1;
                        // 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    = "DelEQPanDianInfo";
                        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("请选择要删除的盘点信息");
            }
        }
Exemplo n.º 18
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("请选择需要删除的行!");
            }
        }
Exemplo n.º 19
0
        private void toolStripButton7_Click(object sender, EventArgs e)
        {
            DataRow r1 = this.dataGView1.GetRowData();

            if (r1 != null)
            {
                if (r1["STATUS"].ToString() == "6")
                {
                    if (WJs.confirmFb("确定冲销吗?"))
                    {
                        dataGView1CellClick();//保证打taGview2 中有数据
                        if (this.dataGView2.GetData() != null)
                        {
                            //rowid = this.dataGView1.CurrentRow.Index;
                            ActionLoad ac = ActionLoad.Conn();
                            ac.Action = "LKWZSVR.lkeq.EQWareManag.EQPanDianSvr";
                            ac.Sql    = "EQCXPD";
                            ac.Add("PDID", r1["PDID"]);
                            ac.Add("CHOSCODE", His.his.Choscode);
                            ac.Add("STATUS", "0");
                            ac.Add("CXUSERID", His.his.UserId);
                            ac.Add("CXUSERNAME", His.his.UserName);

                            ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad_JieZhuang);
                            ac.Post();
                        }
                        else
                        {
                            WJs.alert("盘点细表中没有数据,不能冲销!");
                        }
                    }
                }
                else
                {
                    WJs.alert("只能对状态为已审核的数据进行冲销!");
                }
            }
            else
            {
                WJs.alert("请选择要冲销的盘点信息");
            }
        }
Exemplo n.º 20
0
        private void UnCheck_toolStripButton_Click(object sender, EventArgs e)//提交
        {
            Dictionary <string, ObjItem> dr = this.dataGView1.getRowData();

            if (dr != null)
            {
                if (dr["状态"].ToInt() == 2)
                {
                    if (WJs.confirmFb("您确定要提交审核出库信息id=" + dr["出库ID"].ToString() + "吗?"))
                    {
                        ActionLoad ac = new ActionLoad();
                        ac.Action = "LKWZSVR.lkeq.EQWareManag.EQOutSvr";
                        ac.Sql    = "ChuKuDanUpdate";

                        ac.Add("STATUS", 1);
                        ac.Add("OUTID", dr["出库ID"].ToString());

                        ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
                        ac.Post();
                        this.InStatus_ytComboBox.SelectedIndex = 0;
                        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("请选择要提交审核的出库信息!");
            }
        }
Exemplo n.º 21
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)
                {
                    if (WJs.confirmFb("您确定要删除出库信息id=" + dr["出库ID"].ToString() + "吗?"))
                    {
                        ActionLoad ac = new ActionLoad();
                        ac.Action = "LKWZSVR.lkeq.EQWareManag.EQOutSvr";
                        ac.Sql    = "CHUKuDanDelete";
                        ac.Add("OUTID", dr["出库ID"].ToString());
                        ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
                        ac.Post();
                        this.InStatus_ytComboBox.SelectedIndex = 1;
                        Search_button_Click(null, null);
                    }
                }
                if (dr["状态"].ToInt() == 0)
                {
                    WJs.alert("该出库信息已作废,不能再删除!");
                }
                if (dr["状态"].ToInt() == 2)
                {
                    WJs.alert("该出库信息已审核,不能再删除!");
                }
                if (dr["状态"].ToInt() == 6)
                {
                    WJs.alert("该出库信息已出库,不能再删除!");
                }
            }
            else
            {
                WJs.alert("请选择要删除的出库信息!");
            }
        }
Exemplo n.º 22
0
        private void toolStripButton7_Click(object sender, EventArgs e)//停用
        {
            DataRow r9 = this.dataGView_Main.GetRowData();

            if (r9 != null)
            {
                if (WJs.confirmFb("是否停用?"))
                {
                    rowid = this.dataGView_Main.CurrentRow.Index;
                    ActionLoad ac = ActionLoad.Conn();
                    ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQDictSvr";
                    ac.Sql    = "StopEQDictInfo";
                    ac.Add("EQID", r9["EQID"]);
                    ac.Add("CHOSCODE", His.his.Choscode);
                    ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
                    ac.Post();
                }
            }
            else
            {
                WJs.alert("请选择要停用的设备信息");
            }
        }
Exemplo n.º 23
0
        private void toolStripButton1_Click(object sender, EventArgs e)//停用
        {
            Dictionary <string, ObjItem> dr = this.dataGView1.getRowData();

            if (dr != null)
            {
                if (WJs.confirmFb("是否停用?"))
                {
                    rowid = this.dataGView1.CurrentRow.Index;
                    ActionLoad ac = ActionLoad.Conn();
                    ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQFixKindSvr";
                    ac.Sql    = "StopEQFixKindInfo";
                    ac.Add("REPAIRCODE", dr["类别编码"].ToString());
                    ac.Add("CHOSCODE", His.his.Choscode);
                    ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
                    ac.Post();
                }
            }
            else
            {
                WJs.alert("请选择要停用的厂商信息");
            }
        }
Exemplo n.º 24
0
        //针对删除
        private void Del_toolStripButton_Click(object sender, EventArgs e)
        {
            DataRow row = this.ytTreeView1.getSelectRow();

            if (row != null)
            {
                if (WJs.confirmFb("您确定要删除该统计类别信息?"))
                {
                    ActionLoad ac = ActionLoad.Conn();
                    ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQCountKindSvr";
                    ac.Sql    = "Del";
                    ac.Add("CHOSCODE", row["CHOSCODE"].ToString());
                    ac.Add("COUNTCODE", row["COUNTCODE"].ToString());
                    ac.Add("SUPERCODE", row["SUPERCODE"].ToString());
                    ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
                    ac.Post();
                }
            }
            else
            {
                WJs.alert("请选择要删除的设备统计信息!");
            }
        }
Exemplo n.º 25
0
        private void toolStripButton3_Click(object sender, EventArgs e)//删除
        {
            Dictionary <string, ObjItem> dr = this.dataGView1.getRowData();

            if (dr != null)
            {
                if (WJs.confirmFb("确定要删除选择的期间信息吗?\n删除后不能恢复!"))
                {
                    rowid = this.dataGView1.CurrentRow.Index;
                    ActionLoad ac = ActionLoad.Conn();
                    ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQDateDivideSvr";
                    ac.Sql    = "DelDateDivideInfo";
                    ac.Add("DATEID", dr["期间划分ID"].ToString());
                    ac.Add("CHOSCODE", His.his.Choscode);
                    ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
                    ac.Post();
                }
            }
            else
            {
                WJs.alert("请选择要删除的期间信息!");
            }
        }
Exemplo n.º 26
0
        private void toolStripButton3_Click(object sender, EventArgs e)
        {
            DataRow r = this.ytTreeView1.getSelectRow();

            if (r != null)
            {
                if (WJs.confirmFb("确定要删除选择的设备类别吗?\n删除后不能恢复!"))
                {
                    string values = LData.Es("EQKind_DelScan", null, new object[] { r["KINDCODE"], r["CHOSCODE"] });
                    if (values != null)
                    {
                        WJs.alert("不能删除已使用的设备,只能停用!");
                        return;
                    }


                    tr = this.ytTreeView1.SelectedNode.Parent.Text;//获得其父节点为选中节点
                    string[] str = tr.Split('|');
                    tr = str[0];
                    tr = tr.Trim();
                    ActionLoad ac = ActionLoad.Conn();
                    ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQKind";
                    ac.Sql    = "DelEQKindInfo";
                    ac.Add("KINDCODE", r["KINDCODE"]);
                    ac.Add("SUPERCODE", r["SUPERCODE"]);
                    ac.Add("CHOSCODE", His.his.Choscode);
                    ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
                    ac.Post();
                }
            }
            else
            {
                WJs.alert("请选择要删除的物资类别!");
                return;
            }
        }
Exemplo n.º 27
0
        private void DeltoolStripButton_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.EQWare";
                    ac.Sql    = "Del";
                    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("请选择要删除的设备库房信息!");
            }
        }
Exemplo n.º 28
0
        private void del_toolStrip_Click(object sender, EventArgs e)
        {
            Dictionary <string, ObjItem> drNow = dataGView1.getRowData();

            if (drNow != null)
            {
                if (drNow["折旧ID"].IsNull)
                {
                    //新增过来的全部没有折旧ID,这里设置为修改时的新增信息依旧没有
                    dataGView1.Rows.Remove(dataGView1.CurrentRow);
                }
                else
                {
                    if (WJs.confirmFb("针对原本的设备折旧数据的删除时不可恢复的,您确定要删除吗?"))
                    {
                        DataTable dt = GetZJWork_EQDepre(drNow["卡片ID"].ToString());
                        if (dt != null)
                        {
                            DataRow drR = dt.Rows[0];
                            double  Result;
                            //如果原本为Null,转换失败,则设置为0,否则肯定直接转换成功
                            if (!double.TryParse(drR["TOTALZJ"].ToString(), out Result))
                            {
                                drR["TOTALZJ"] = "0.00";
                            }

                            if (!double.TryParse(drR["TOTALEDWORK"].ToString(), out Result))
                            {
                                drR["TOTALEDWORK"] = "0.00";
                            }
                            //这样就避免了,当为Null的时候,去更新出错,直接小于就return掉了
                            if (Convert.ToDouble(drR["TOTALZJ"].ToString()) < (drNow["本月折旧"].ToDouble()))
                            {
                                WJs.alert("无法删除该行:卡片累计折旧小于本月折旧,无法删除,否则更新时出现折旧为负数!");
                                return;
                            }
                            if (Convert.ToDouble(drR["TOTALEDWORK"].ToString()) < (drNow["本月工作量"]).ToDouble())
                            {
                                WJs.alert("无法删除该行:累计工作量小于本月工作量,无法删除,否则更新时出现工作量为负数!");
                                return;
                            }
                            LData.Exe("UpdateNumForDeleNotNull_EQDepreManag", null, new object[] { drNow["本月折旧"].ToDouble(), drNow["本月工作量"].ToDouble(), drNow["卡片ID"].ToString(), His.his.Choscode });
                        }
                        else
                        {
                            //这里只要有一个为空,就会进行不下去,难道出现负数?
                            WJs.alert("不存在卡片" + drNow["卡片ID"].ToString() + "的数据,请查看建卡界面!");
                            return;
                        }
                        LData.Exe("DeleteEQReciationInfo_EQDepreEdit", null, new object[] { dr["折旧ID"].ToString(), drNow["卡片ID"].ToString(), His.his.Choscode });
                        dataGView1.Rows.Remove(dataGView1.CurrentRow);
                        WJs.alert("删除成功!");
                    }
                }
            }
            else
            {
                WJs.alert("请选择要删除的设备调拨信息!");
            }
            if (isFlag == 2 && dataGView1.RowCount == 0)
            {
                SleDeptid_toolStrip.Enabled = true;
                Deptid_selTextInpt.Enabled  = true;
            }
        }
Exemplo n.º 29
0
        /// <summary>
        /// 保存  -- 针对新增和修改
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            if (this.ioname_textBox.Text.Trim().Length == 0)
            {
                WJs.alert("请填写入出名称!");
                return;
            }
            if (this.recipecode_textBox.Text.Trim().Length == 0)
            {
                WJs.alert("请填写单据前缀!");
                return;
            }
            if (this.recipeyear_ytComboBox.SelectedIndex < 0)
            {
                WJs.alert("请选择单据年份!");
                return;
            }
            if (this.recipemonth_ytComboBox.SelectedIndex < 0)
            {
                WJs.alert("请选择单据月份!");
                return;
            }
            if (this.recipelength_textBox.Text.Trim().Length == 0 || Convert.ToInt32(this.recipelength_textBox.Text.Trim()) <= 0)
            {
                WJs.alert("请填写单据编码长度,注意其长度必须大于0!");
                return;
            }

            if (this.ioflag_ytComboBox.SelectedIndex < 0)
            {
                WJs.alert("请选择入出标志!");
                return;
            }
            if (this.opflag_ytComboBox.SelectedIndex < 0)
            {
                WJs.alert("请选择操作标志!");
                return;
            }
            if (this.ifuse_ytComboBox.SelectedIndex < 0)
            {
                WJs.alert("请选择是否使用!");
                return;
            }
            if (this.ifdefault_ytComboBox.SelectedIndex < 0)
            {
                //这里需要做一个数据库的校验
                WJs.alert("请选择是否默认值!");
                return;
            }

            ActionLoad ac = ActionLoad.Conn();

            ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQInOutSvr";
            //17个
            ac.Add("IONAME", this.ioname_textBox.Text.Trim());
            ac.Add("PYCODE", this.pycode_textBox.Text.Trim());
            ac.Add("WBCODE", this.wbcode_textBox.Text.Trim());
            ac.Add("IFUSE", this.ifuse_ytComboBox.SelectedIndex.ToString());
            ac.Add("RECIPECODE", this.recipecode_textBox.Text.Trim());
            ac.Add("RECIPELENGTH", this.recipelength_textBox.Text.Trim());
            ac.Add("RECIPEYEAR", this.recipeyear_ytComboBox.SelectedIndex.ToString());
            ac.Add("RECIPEMONTH", this.recipemonth_ytComboBox.SelectedIndex.ToString());
            ac.Add("MEMO", this.memo_textBox.Text.Trim());
            ac.Add("IOFLAG", this.ioflag_ytComboBox.SelectedIndex.ToString());//ioflag_ytComboBox.SelectedValue 这样其实才是正规的
            ac.Add("OPFLAG", this.opflag_ytComboBox.SelectedIndex.ToString());
            ac.Add("IFDEFAULT", this.ifdefault_ytComboBox.SelectedIndex.ToString());
            ac.Add("USERID", His.his.UserId);
            ac.Add("USERNAME", His.his.UserName);
            ac.Add("CHOSCODE", His.his.Choscode);
            ac.Add("RECDATE", this.dateTimePicker1.Value);
            if (!isAdd)
            {
                ac.Add("IOID", this.ioid_textBox.Text.Trim());
                ac.Sql = "Modify";
            }
            else
            {
                ac.Sql = "Add";
            }
            ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
            ac.Post();

            if (isOk)
            {
                if (isAdd)
                {
                    if (WJs.confirmFb("新增设备入出库记录成功,是否继续添加?"))
                    {
                        initForm();
                    }
                    else
                    {
                        this.Close();
                    }
                }
                else
                {
                    WJs.alert("保存设备入出库记录成功!");
                    this.Close();
                }
            }
        }
Exemplo n.º 30
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (this.statusname_yTextBox.Text.Trim().Length == 0)
            {
                WJs.alert("请填写设备状态名称!");
                return;
            }
            if (this.ifuse_ytComboBox.SelectedIndex < 0)
            {
                WJs.alert("请选择是否使用!");
                return;
            }
            if (this.ifdefault_ytComboBox.SelectedIndex < 0)
            {
                WJs.alert("请选择是否默认值!");
                return;
            }
            if (this.ifdepreciation_ytComboBox.SelectedIndex < 0)
            {
                WJs.alert("请选择是否计提折旧!");
                return;
            }

            ActionLoad ac = ActionLoad.Conn();

            ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQStatusSvr";
            //STATUSCODE,STATUSNAME,PYCODE,WBCODE,IFUSE,IFDEPRECIATION,IFDEFAULT,MEMO,USERID,USERNAME,RECDATE,CHOSCODE
            ac.Add("STATUSNAME", this.statusname_yTextBox.Text.Trim());
            ac.Add("PYCODE", this.pycode_yTextBox.Text.Trim());
            ac.Add("WBCODE", this.wbcode_yTextBox.Text.Trim());
            ac.Add("IFUSE", this.ifuse_ytComboBox.SelectedIndex.ToString());
            ac.Add("IFDEPRECIATION", this.ifdepreciation_ytComboBox.SelectedIndex.ToString());
            ac.Add("IFDEFAULT", this.ifdefault_ytComboBox.SelectedIndex.ToString());
            ac.Add("MEMO", this.memo_yTextBox.Text.Trim());
            ac.Add("USERID", this.userid_yTextBox.Text.Trim());
            ac.Add("USERNAME", this.username_yTextBox.Text.Trim());
            ac.Add("RECDATE", this.dateTimePicker1.Value);
            ac.Add("CHOSCODE", His.his.Choscode);
            if (isAdd)
            {
                ac.Sql = "Add";
            }
            else
            {
                ac.Sql = "Modify";
                //修改则需传递状态编码
                ac.Add("STATUSCODE", this.statuscode_yTextBox.Text.ToString());
            }
            ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
            ac.Post();
            if (isOk)
            {
                if (isAdd)
                {
                    if (WJs.confirmFb("添加设备状态信息成功,是否继续添加?"))
                    {
                        InitForm();
                    }
                    else
                    {
                        this.Close();
                    }
                }
                else
                {
                    WJs.alert("保存设备状态信息成功!");
                    this.Close();
                }
            }
        }