Exemplo n.º 1
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.º 2
0
        private void EQCheckManagEdit_Load(object sender, EventArgs e)
        {
            //this.NextCheckdate_dateTimePicker.Value = dt;
            TvList.newBind().add("作废", "0").add("有效", "1").Bind(Status_ytComboBox1);
            this.Status_ytComboBox1.SelectedIndex = 1;
            this.Status_ytComboBox1.Enabled       = false;
            this.Userid_textBox.ReadOnly          = true;
            this.Username_textBox.ReadOnly        = true;
            this.choscode_textBox.ReadOnly        = true;


            cardId_textBox.Value = drZ["卡片ID"].ToString();
            cardId_textBox.Text  = drZ["卡片ID"].ToString();


            this.deptid_selTextInpt.Value = drZ["使用科室"].ToString();
            this.deptid_selTextInpt.Text  = LData.Es("GetEQAskBuy_KSName_KeepFit", null, new object[] { His.his.Choscode, drZ["使用科室"].ToString() });

            if (isFlag == 0 || isFlag == 1)
            {
                LoadInfo_EQFixManagEdit();
                if (isFlag == 0)
                {
                    this.Save_button.Enabled = false;
                }
            }
            else
            {
                recdate_dateTimePicker.Value = DateTime.Now;
                Userid_textBox.Text          = His.his.UserId.ToString();
                Username_textBox.Text        = His.his.UserName;
                choscode_textBox.Text        = His.his.Choscode;
            }
        }
Exemplo n.º 3
0
        private void add_toolStripButton_Click(object sender, EventArgs e)//新增
        {
            this.KeyPreview = true;

            Dictionary <string, object> de = new Dictionary <string, object>();

            de["采购数量"] = 0;
            de["采购单价"] = "0.0000";
            de["采购金额"] = "0.0000";

            string wareid = this.InWare_selTextInpt.Value;
            string ifall  = LData.Es("EQWareIfall", null, new object[] { wareid });

            if (ifall.Equals("1"))
            {
                dataGView1.addSql("EQPurchasePlan_GetInEQ0", "设备名称", "", wareid + "|" + His.his.Choscode + "|" + His.his.Choscode + "|{key}|{key}|{key}|{key}");
            }
            else
            {
                dataGView1.addSql("EQPurchasePlan_GetInEQ", "设备名称", "", wareid + "|" + His.his.Choscode + "|" + His.his.Choscode + "|{key}|{key}|{key}|{key}");
            }
            dataGView1.addSql("CountryAskBuy_Add", "国别", "", "{key}|{key}|{key}");

            dataGView1.addSql("EQPurchasePlan_GetCompany", "生产商", "", His.his.Choscode + "|{key}|{key}|{key}");
            dataGView1.addSql("EQPurchasePlan_GetCompany1", "供应商", "", His.his.Choscode + "|{key}|{key}|{key}");
            TvList.newBind().Load("EQDict_SingerCode", null).Bind(this.unitcode);
            this.dataGView1.CellValueChanged += new DataGridViewCellEventHandler(dataGView1_CellValueChanged);
            this.dataGView1.AddRow(de, 0);
            this.dataGView1.CurrentRow.Cells[eqname.Index].ReadOnly = false;
            //this.dataGView1.CurrentRow.Cells[rowno.Index].Value = this.dataGView1.RowCount ;
        }
Exemplo n.º 4
0
        private void LoadInfoInEQWare()
        {
            this.warecode_yTextBox1.Text = dr["库房编码"].ToString();
            this.warename_yTextBox1.Text = dr["库房名称"].ToString();

            string depid = LData.Es("EQWare_GetDepID", null, new object[] { dr["医疗机构编码"].ToString(), dr["库房编码"].ToString() });

            this.selTextInpt1.Text  = dr["科室"].ToString();
            this.selTextInpt1.Value = depid;

            if (dr["是否使用"].ToString() == "1")
            {
                this.ifuse_ytComboBox.SelectedIndex = 0;
            }
            else
            {
                this.ifuse_ytComboBox.SelectedIndex = 1;
            }
            if (dr["IFALL"].ToString() == "1")
            {
                this.ifall_ytComboBox.SelectedIndex = 0;
            }
            else
            {
                this.ifall_ytComboBox.SelectedIndex = 1;
            }

            this.memo_yTextBox.Text   = dr["备注"].ToString();
            this.wbcode_yTextBox.Text = dr["拼音码"].ToString();
            this.pycode_yTextBox.Text = dr["拼音码"].ToString();
        }
Exemplo n.º 5
0
        private void LoadInfo_EQFixManagEdit()  //如果为修改或者浏览时执行
        {
            Maintainid_textBox.Text  = drX["保养ID"].ToString();
            memo_textBox.Text        = drX["备注"].ToString();
            Status_ytComboBox1.Value = drX["状态"].ToString();

            //Maintaincode_selText.Text = drX["保养类别名称"].ToString();
            Maintaincode_selText.Value     = drX["保养类型"].ToString();
            this.Maintaincode_selText.Text = LData.Es("GetEQMaintainName_KeepFit", null, new object[] { drX["保养类型"].ToString() });


            Maintaindate_dateTimePicker.Value = drX["保养日期"].ToDateTime();
            MaintainThing_textBox.Text        = drX["保养情况"].ToString();
            //reportman_textBox.Text = drX["报修人"].ToString();

            BaoyangPeople_textBox.Text = drX["保养人"].ToString();
            textBox_RepairPeople.Text  = drX["维修人"].ToString();

            RepairDeptId_selText.Value = drX["维修科室"].ToString();
            // RepairDeptId_selText.Text = drX["维修科室名称"].ToString();
            this.RepairDeptId_selText.Text = LData.Es("GetEQAskBuy_KSName_KeepFit", null, new object[] { His.his.Choscode, drX["维修科室"].ToString() });


            CLfare_textBox.Text       = drX["材料费"].ToString();
            Maintainfare_textBox.Text = drX["保养费"].ToString();
            OtherFare_textBox.Text    = drX["其它"].ToString();

            ChangeParts_textBox.Text     = drX["更换部件"].ToString();
            recdate_dateTimePicker.Value = drX["修改时间"].ToDateTime();


            this.Username_textBox.Text = drX["操作员姓名"].ToString();
            this.Userid_textBox.Text   = drX["操作员ID"].ToString();
            this.choscode_textBox.Text = drX["医疗机构编码"].ToString();
        }
Exemplo n.º 6
0
 private void EQDiaoBoEdit_Load(object sender, EventArgs e)
 {
     //浏览或编辑
     if (isFlag == 0 || isFlag == 1)
     {
         LoadZhuBiaoData();
         LoadXiBiaoData();
         if (isFlag == 0)
         {
             //浏览
             this.toolStrip1.Enabled             = false;
             this.targetware_selTextInpt.Enabled = false;
             this.outfalg_selTextInpt.Enabled    = false;
             this.memo_textBox.Enabled           = false;
             this.dateTimePicker1.Enabled        = false;
             this.dataGView1.ReadOnly            = true;
         }
         this.ware_selTextInpt.Enabled = false;//浏览或者编辑都不允许更改出库库房了
     }
     else
     {
         //新增则直接初始化
         UnitCodeBind();
     }
     isCanFKC = LData.Es("FindIfCanFKC", null, new object[] { 2207 });
     this.dataGView1.RowToXml += new RowToXmlHandle(dataGView1_RowToXml);
 }
Exemplo n.º 7
0
        private void add_toolStripButton_Click(object sender, EventArgs e)
        {
            this.KeyPreview = true;
            //判断是否选择库房
            if (this.InWare_selTextInpt.Value == null)
            {
                WJs.alert("请选择入库库房!");
                InWare_selTextInpt.Focus();
                return;
            }
            //判断是否选择入库方式
            if (this.InWay_selTextInpt.Value == null)
            {
                WJs.alert("请选择入库方式!");
                InWay_selTextInpt.Focus();
                return;
            }

            Dictionary <string, object> de = new Dictionary <string, object>();

            de["生产日期"] = WJs.getDate(His.his.WebDate);


            de["数量"]   = 0;
            de["发票单价"] = "0";
            de["运杂费"]  = "0";
            de["成本单价"] = "0";
            de["成本金额"] = "0";
            de["有效期"]  = WJs.getDate(His.his.WebDate).AddYears(1);


            string wareid = this.InWare_selTextInpt.Value;
            string ifall  = LData.Es("EQWareIfall", null, new object[] { wareid });

            //string wz_s = "物资";
            // string wzid_s="";
            if (ifall.Equals("1"))
            {
                // this.InWZ_selTextInpt.Sql = "GetInWZ0";
                dataGView1.addSql("GetInEQ0", "设备", "", His.his.Choscode + "|" + wareid + "|{key}|{key}|{key}|{key}");
                //this.InWZ_selTextInpt.SelParam = His.his.Choscode + "|" + wareid + "|{key}|{key}";
                // dataGView1.addSql("",wz_s,wzid_s,
            }
            else
            {
                // this.InWZ_selTextInpt.Sql = "GetInWZ";
                dataGView1.addSql("GetInEQ", "设备", "", His.his.Choscode + "|" + wareid + "|{key}|{key}|{key}|{key}");
            }

            // this.dataGView1.addSql("GetSupply", "生产厂家", "", His.his.Choscode + "|{key}|{key}|{key}|{key}");
            // TvList.newBind().SetCacheKey("XmDw").Load("GetSupply", new object[] { His.his.Choscode }).Bind(this.supply);
            this.dataGView1.CellValueChanged += new DataGridViewCellEventHandler(dataGView1_CellValueChanged);

            // this.dataGView1.CellEndEdit += new DataGridViewCellEventHandler(dataGView1_CellEndEdit);

            this.dataGView1.AddRow(de, 0);
            this.dataGView1.CurrentRow.Cells[eq.Index].ReadOnly = false;
        }
Exemplo n.º 8
0
        void EQYJMONEY(object sender, EventArgs e)
        {
            if (this.selTextInpt_EQID.Text.Trim().Length <= 0)
            {
                //WJs.alert("请先选择设备ID!"); //避免没有先输入设备ID而导致的查询错误。
                this.yTextBox_QGNum.Clear();
                this.selTextInpt_EQID.Focus();
                return;
            }
            if (!int.TryParse(this.yTextBox_QGNum.Text, out QGNum))
            {
                this.yTextBox_QGNum.Clear();
                this.yTextBox_QGNum.Focus();
                WJs.alert("请购的数量必须是大于零的整数!");
                return;
            }
            else if (QGNum <= 0)
            {
                this.yTextBox_QGNum.Clear();
                this.yTextBox_QGNum.Focus();
                WJs.alert("请购的数量必须是大于零的整数!");
                return;
            }
            if (this.yTextBox_YJPRICE.Text.Trim().Length <= 0)
            {
                string price = LData.Es("EQFindPrice_AskBuy_Add", null, new object[] { His.his.Choscode, this.selTextInpt_EQID.Text });



                if (price != null)
                {
                    this.yTextBox_YJMONEY.Text = (int.Parse(this.yTextBox_QGNum.Text) * int.Parse(price)).ToString();
                }
                else
                {
                    this.yTextBox_YJMONEY.Text = (int.Parse(this.yTextBox_QGNum.Text) * 0).ToString();
                }
            }
            else
            {
                decimal dec;
                if (decimal.TryParse(this.yTextBox_YJPRICE.Text.Trim(), out dec))
                {
                    if (dec < 0)
                    {
                        WJs.alert("预计单价必须是大于零的实数!");
                        yTextBox_YJPRICE.Focus();
                        return;
                    }
                }

                this.yTextBox_YJMONEY.Text = (int.Parse(this.yTextBox_QGNum.Text) * int.Parse(this.yTextBox_YJPRICE.Text)).ToString();
            }
        }
Exemplo n.º 9
0
        public EQLingUse()
        {
            InitializeComponent();
            TvList.newBind().add("作废", "0").add("等待审核", "1").add("审核被拒", "2").add("已审核", "6").add("已冲销", "7").add("全部", "10").Bind(this.Status_ytComboBox);
            this.Status_ytComboBox.SelectedIndex = 1;

            this.selTextInpt1.Sql      = "WareBindInDiaoBo";
            this.selTextInpt1.SelParam = His.his.Choscode + "|{key}|{key}|{key}|{key}";

            IOIDInDetail  = LData.Es("FindIOIdInEQInMainLingYong", null, new object[] { His.his.Choscode });
            IfLYBuildCard = GetSysDanWei(2201);
        }
Exemplo n.º 10
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.º 11
0
        //flowno, inid, warecode, deptid, eqid, stockid, num, beforenum, unitcode, outnum, cardnum, gg,
        //xh, cd,price, money, othermoney, totalprice, totalmoney, supplyid, supplyname, productdate,
        //validdate, memo, txm, recipecode, shdh, ghsupplyid, ghsupplyname, indate, choscode  31
        //库存流水   出库库房对应库存流水号
        private void AddEQStockDetailInfo(ActionLoad ac, Dictionary <string, ObjItem> drX, Dictionary <string, ObjItem> drZ)
        {
            //之前便已经更新完INID  从数据库获取

            ac.Add("FLOWNO", "");//服务端生成

            string InIdForStockDetail = LData.Es("FindINIDForStockDetail", null, new object[] { drZ["出库ID"].ToString(), drZ["医疗机构编码"].ToString() });

            ac.Add("INID", InIdForStockDetail);           //对应入库主表主键

            ac.Add("WARECODE", drZ["出库目的库房"].ToString()); //入库主表的入库库房编码=出库主表的目的库房编码
            ac.Add("EQID", drX["设备ID"].ToString());
            ac.Add("DEPTID", TargetWareDeptid);

            if (ifHaveExsit)
            {
                ac.Add("STOCKID", GetStockIdAndNum.Rows[0][0].ToString());//对应库存主键
            }
            else
            {
                ac.Add("STOCKID", "");
            }
            ac.Add("NUM", drX["数量"].ToInt());
            ac.Add("BEFORENUM", BeforeNum);
            ac.Add("UNITCODE", drX["单位编码"].ToString());
            ac.Add("OUTNUM", 0);
            ac.Add("CARDNUM", 0);

            ac.Add("GG", drX["规格"].ToString());
            ac.Add("XH", drX["型号"].ToString());
            ac.Add("CD", drX["产地"].ToString());
            ac.Add("PRICE", drX["单价"].ToString());
            ac.Add("MONEY", drX["金额"].ToString());
            ac.Add("OTHERMONEY", drX["运杂费"].ToString());
            ac.Add("TOTALPRICE", drX["成本单价"].ToString());
            ac.Add("TOTALMONEY", drX["成本金额"].ToString());
            ac.Add("PRODUCTDATE", drX["生产日期"].ToDateTime());
            ac.Add("VALIDDATE", drX["有效期"].ToDateTime());
            ac.Add("MEMO", drX["备注"].ToString());
            ac.Add("SUPPLYID", drX["生产厂家ID"].ToString());
            ac.Add("SUPPLYNAME", drX["生产厂家名称"].ToString());
            ac.Add("TXM", drX["条形码"].ToString());

            ac.Add("RECIPECODE", "");

            ac.Add("SHDH", "");
            ac.Add("GHSUPPLYID", "");
            ac.Add("GHSUPPLYNAME", "");
            ac.Add("INDATE", DateTime.Now);
            ac.Add("CHOSCODE", drX["医疗机构编码"].ToString());
        }
Exemplo n.º 12
0
        //private void button2_Click(object sender, EventArgs e)//清除
        //{
        //    this.textBox1.Text = "";
        //    this.yTxtBox_Name.Text = "";
        //    this.yTxtBox_PY.Text = "";
        //    this.yTxtBox_WB.Text = "";
        //}

        private void button1_Click(object sender, EventArgs e) //查询
        {
            SqlStr sql = SqlStr.newSql();                      //创建SqlStr对象

            ytTreeView1.sql = "ScanEQKind";
            this.ytTreeView1.reLoad(new object[] { His.his.Choscode });

            string strF  = this.Search_yTextBox1.Text.Trim();
            string strF1 = null;
            string strF2 = null;
            string strF3 = null;
            string strF4 = null;

            if (this.Search_yTextBox1.Text.Trim().Length > 0)
            {
                if (this.Search_ytComboBox1.SelectedIndex > -1)
                {
                    //在获取用户输入的前提下,加入下拉框中的内容 类似stringbuilder
                    if (this.Search_ytComboBox1.SelectedIndex == 0)
                    {
                        strF1 = strF;
                    }
                    if (this.Search_ytComboBox1.SelectedIndex == 1)
                    {
                        strF2 = strF;
                    }
                    if (this.Search_ytComboBox1.SelectedIndex == 2)
                    {
                        strF3 = strF;
                    }
                    if (this.Search_ytComboBox1.SelectedIndex == 3)
                    {
                        strF4 = strF;
                    }
                    if (this.Search_ytComboBox1.SelectedIndex == 4)
                    {
                        strF1 = "%" + strF + "%"; strF2 = "%" + strF + "%"; strF3 = "%" + strF + "%"; strF4 = "%" + strF + "%";
                    }
                }
                else
                {
                    WJs.alert("请选择查询条件!");
                }
            }


            string text = LData.Es("FindEQKind", null, new object[] { His.his.Choscode, strF1, strF2, strF3, strF4 });

            FindNode(this.ytTreeView1.Nodes, text);
        }
Exemplo n.º 13
0
        private void EQPanDian_Select_Load(object sender, EventArgs e)
        {
            // WJs.SetDictTimeOut();//什么意思?
            ytTreeView1.vFiled = "KINDCODE";
            ytTreeView1.tFiled = "KINDNAME";
            ytTreeView1.pFiled = "SUPERCODE";

            string b = LData.Es("EQPDFind_WARENAME", null, new object[] { His.his.Choscode, ware });

            this.yTextBox_Ware.Text      = b;
            this.yTextBox_Ware.ReadOnly  = true;
            ytTreeView1.sql              = "ScanEQKind";
            this.ytTreeView1.FormatText += new YtWinContrl.com.events.TextFormatEventHandle(ytTreeView1_FormatText);
            this.ytTreeView1.reLoad(new object[] { His.his.Choscode });
        }
Exemplo n.º 14
0
 private void EQLingYongEdit_Load(object sender, EventArgs e)
 {
     //浏览或编辑
     if (isFlag == 0 || isFlag == 1)
     {
         LoadZhuBiaoData();
         LoadXiBiaoData();
         if (isFlag == 0)
         {
             //浏览
             DisEnable();
         }
         this.ware_selTextInpt.Enabled = false;//新增和编辑都不允许对库房进行修改了
     }
     isCanFKC = LData.Es("FindIfCanFKC", null, new object[] { 2207 });
 }
Exemplo n.º 15
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();
            }
        }
Exemplo n.º 16
0
        private void EQDiaoBoManag_Load(object sender, EventArgs e)
        {
            TvList.newBind().add("作废", "0").add("等待审核", "1").add("审核被拒", "2").add("已审核", "6").add("已冲销", "7").Bind(this.status_Column);
            TvList.newBind().add("普通", "0").add("调拨", "1").add("申领", "2").add("盘点", "3").Bind(this.opflag_Cloumn);
            IOID = LData.Es("FindIOIdInEQInMain", null, new object[] { His.his.Choscode });
            //[这里其实都可以用联合查询做出来,为了不做代码块的大范围改动,这里暂时不修改]

            //库房名称绑定
            ActionLoad acware = ActionLoad.Conn();

            acware.Action = "LKWZSVR.lkeq.WareManag.EQDiaoBoSvr";
            acware.Sql    = "BindWareName";
            acware.Add("CHOSCODE", His.his.Choscode);
            acware.ServiceLoad += new YtClient.data.events.LoadEventHandle(acware_ServiceLoad);
            acware.Post();


            //出库名称绑定
            ActionLoad acoutname = ActionLoad.Conn();

            acoutname.Action = "LKWZSVR.lkeq.WareManag.EQDiaoBoSvr";
            acoutname.Sql    = "BindOutName";
            acoutname.Add("CHOSCODE", His.his.Choscode);
            acoutname.ServiceLoad += new YtClient.data.events.LoadEventHandle(acoutname_ServiceLoad);
            acoutname.Post();

            //细表中 单位编码转换为汉字
            UnitCodeBind();

            //细表  设备ID
            EQIDBind();

            this.dataGView1.Url = "LoadEQOutMainInfo";
            // this.dataGView1.IsPage = true;
            this.dataGView2.Url = "LoadEQOutDetailList";



            this.dateTimeDuan1.InitCorl();
            this.dateTimeDuan1.SelectedIndex = -1;
            this.dateTimePicker1.Value       = DateTime.Now.AddMonths(-1);
            this.dateTimePicker2.Value       = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59);
        }
Exemplo n.º 17
0
        private void Save_button_Click(object sender, EventArgs e)//保存
        {
            if (this.textBox_CheckUnit.Text.Trim() == "")
            {
                WJs.alert("请填写检查单位");
                this.textBox_CheckUnit.Focus();
                return;
            }
            if (this.CheckPeople_textBox.Text.Trim() == "")
            {
                WJs.alert("请填写检查人");
                this.CheckPeople_textBox.Focus();
                return;
            }


            string str1 = LData.Es("IfTheJiLiang_EQKeepFit", null, new object[] { str, His.his.Choscode });

            if (str1 == "1")
            {
                dt = this.NextCheckdate_dateTimePicker.Value;
                if (this.NextCheckdate_dateTimePicker.Value == this.dateTimePicker_CheckDate.Value)
                {
                    WJs.alert("请填写下次检定日期!");
                    this.NextCheckdate_dateTimePicker.Focus();
                    return;
                }
            }



            //下面开始保存了
            ActionLoad ac = ActionLoad.Conn();

            ac.Action = "LKWZSVR.lkeq.UseingEQ.EQCheckManagSvr";

            ac.Sql = "ModifyOrAddInfo";

            AddRepairCardInfo(ac);
            ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
            ac.Post();
        }
Exemplo n.º 18
0
        private void EQPanDian_DetailScan_Load(object sender, EventArgs e)
        {
            this.WindowState = FormWindowState.Maximized;
            TvList.newBind().Load("Chang_LSDanWeiBianMa", null).Bind(this.Column24);

            //this.dataGView1.Url = "WZPD_ScanStockDetail";
            //this.dataGView1.reLoad(new object[] { r["WARECODE"].ToString(), His.his.Choscode });
            //this.ytComboBox_PDWareNum.Enabled = false;
            //this.ytComboBox_PDWareNum.Text = wareName;
            //this.ytComboBox_PDWareNum.Value = wareValue;
            this.selTextInpt_Ware.Value   = wareValue;
            this.selTextInpt_Ware.Text    = wareName;
            this.selTextInpt_Ware.Enabled = false;
            // this.ytComboBox_PDWareNum.Text = LData.Es("EQPDFind_WARENAME", null, new object[] { His.his.Choscode, this.ytComboBox_PDWareNum.Value });

            //  TvList.newBind().SetCacheKey("pdkfbm").Load("EQPDFind_WARE", new object[] { His.his.Choscode }).Bind(this.ytComboBox_PDWareNum);

            if (!this.isAdd)
            {
                // this.ytComboBox_PDWareNum.Value = r["WARECODE"].ToString();
                this.selTextInpt_Ware.Value = r["WARECODE"].ToString();
                wareValue = r["WARECODE"].ToString();
                this.yTextBox_Name.Text    = r["PDNAME"].ToString();
                this.selTextInpt_Ware.Text = LData.Es("EQPDFind_WARENAME", null, new object[] { His.his.Choscode, wareValue });
                if (r["MEMO"] != null)
                {
                    this.yTextBox_Rec.Text = r["MEMO"].ToString();
                }
            }
            if (this.isScan)
            {
                this.toolStripButton_Save.Enabled   = false;
                this.toolStripButton_Del.Enabled    = false;
                this.selTextInpt_Ware.Enabled       = false;
                this.yTextBox_Rec.Enabled           = false;
                this.toolStripButton_Cancel.Enabled = false;
            }
            button1_Click_2(null, null);  //查询数据
        }
Exemplo n.º 19
0
        private void LoadInfo_EQFixManagEdit()  //如果为修改或者浏览时执行
        {

            NOID_textBox.Text = drX["下账ID"].ToString();
            memo_textBox.Text = drX["备注"].ToString();
            Status_ytComboBox1.Value = drX["状态"].ToString();
            this.IOID_selText.Value = drX["下账类别"].ToString();
            this.IOID_selText.Text = LData.Es("GetEQMaintainName_EQKeepAccount", null, new object[] {His.his.Choscode, drX["下账类别"].ToString() });
            this.QLFARE_textBox.Text = drX["清理费"].ToString();
            this.CVALUE_textBox.Text = drX["残值"].ToString();
            this.NOREASON_textBox.Text = drX["下账原因"].ToString();
            this.reportman_selText.Text = drX["申请人"].ToString();
            this.repotruserId_textBox.Text = drX["申请人ID"].ToString();
            this.reportman_selText.Value = drX["申请人ID"].ToString();
            if (drX["鉴定日期"].ToString().Trim() != "")
            {
                this.dateTimePicker_REPORTDATE.Value = drX["鉴定日期"].ToDateTime();
            }
            this.textBox_JDADVICE.Text = drX["鉴定意见"].ToString();
            this.textBox_JDMAN.Text = drX["鉴定人"].ToString();
            this.textBox_JDUSERID.Text = drX["鉴定人ID"].ToString();
            if (drX["鉴定日期"].ToString().Trim() != "")
            {
                this.dateTimePicker_JDDATE.Value = drX["鉴定日期"].ToDateTime();
            }
            this.textBox_SHADVICE.Text = drX["审批意见"].ToString();
            this.textBox_SHMAN.Text = drX["审批人"].ToString();
            this.textBox_SHUSERID.Text = drX["审批人ID"].ToString();
            if (drX["审批日期"].ToString().Trim() != "")
            {
                this.dateTimePicker_SHDATE.Value = drX["审批日期"].ToDateTime();
            }
            recdate_dateTimePicker.Value = drX["修改时间"].ToDateTime();
            this.Username_textBox.Text = drX["操作员姓名"].ToString();
            this.Userid_textBox.Text = drX["操作员ID"].ToString();
            this.choscode_textBox.Text = drX["医疗机构编码"].ToString();
             str=drZ["设备名称"].ToString();
        }
Exemplo n.º 20
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.º 21
0
        private void btn_Save_Click(object sender, EventArgs e)
        {
            if (this.yTextBox_Name.Text.Trim().Length == 0)
            {
                WJs.alert("请输入类别名称!");
                this.yTextBox_Name.Focus();
                return;
            }

            if (this.ytComboBox_ifUse.SelectedIndex == -1)
            {
                WJs.alert("请选择是否使用!");
                ytComboBox_ifUse.Focus();
                return;
            }
            if (this.ytComboBox_IfDefault.SelectedIndex == -1)
            {
                WJs.alert("请选择是否默认值!");
                ytComboBox_IfDefault.Focus();
                return;
            }
            string str = LData.Es("EQMostLarge_REPAIRCODE", null, new object[] { His.his.Choscode });

            //if (str != null)
            //{
            if (str == "99")
            {
                WJs.alert("编码已达到最大数,不允许新增操作!");

                return;
            }

            //}
            //else
            //{
            //    return;
            //}
            ActionLoad ac = ActionLoad.Conn();

            ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQFixKindSvr";
            ac.Sql    = "SaveFixKindInfo";
            ac.Add("IFDEFAULT", TvList.getValue(this.ytComboBox_IfDefault).ToInt());
            ac.Add("IFUSE", TvList.getValue(this.ytComboBox_ifUse).ToInt());
            ac.Add("REPAIRNAME", this.yTextBox_Name.Text);
            ac.Add("USERID", His.his.UserId);
            ac.Add("USERNAME", His.his.UserName);
            ac.Add("CHOSCODE", His.his.Choscode);
            ac.Add("PYCODE", this.yTextBox_PY.Text);
            ac.Add("WBCODE", this.yTextBox_WB.Text);
            ac.Add("MEMO", this.yTextBox_Rec.Text);

            if (!isAdd)
            {
                ac.Add("REPAIRCODE", Info["类别编码"].ToInt());
            }
            else
            {
                ac.Add("REPAIRCODE", null);
            }
            ac.ServiceLoad    += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
            ac.ServiceFaiLoad += new YtClient.data.events.LoadFaiEventHandle(ac_ServiceFaiLoad);
            ac.Post();
        }
Exemplo n.º 22
0
        private void add_toolStripButton_Click(object sender, EventArgs e)
        {
            this.KeyPreview = true;
            //判断是否选择库房
            if (this.InWare_selTextInpt.Value == null)
            {
                WJs.alert("请选择出库库房!");
                InWare_selTextInpt.Focus();
                return;
            }
            //判断是否选择入库方式
            if (this.InWay_selTextInpt.Value == null)
            {
                WJs.alert("请选择出库方式!");
                InWay_selTextInpt.Focus();
                return;
            }

            Dictionary <string, object> de = new Dictionary <string, object>();

            de["数量"]     = 0;
            de["医疗机构编码"] = His.his.Choscode;
            string IfCanOut = LData.Es("findEQUse_IfCanOut", null, new object[] { His.his.Choscode });
            string wareid   = this.InWare_selTextInpt.Value;
            string ifall    = LData.Es("EQWareIfall", null, new object[] { wareid });

            //string wz_s = "物资";
            // string wzid_s="";
            if (ifall.Equals("1"))
            {
                if (IfCanOut == "0")
                {
                    dataGView1.addSql("GetOutEQ0", "设备", "", His.his.Choscode + "|" + wareid + "|{key}|{key}|{key}|{key}");
                }
                else
                {
                    dataGView1.addSql("GetOutEQ01", "设备", "", His.his.Choscode + "|" + wareid + "|{key}|{key}|{key}|{key}");
                }
            }
            else
            {
                if (IfCanOut == "0")
                {
                    dataGView1.addSql("GetOutEQ1", "设备", "", His.his.Choscode + "|" + wareid + "|{key}|{key}|{key}|{key}");
                }
                else
                {
                    dataGView1.addSql("GetOutEQ11", "设备", "", His.his.Choscode + "|" + wareid + "|{key}|{key}|{key}|{key}");
                }
            }

            // this.dataGView1.addSql("GetSupply", "生产厂家", "", His.his.Choscode + "|{key}|{key}|{key}|{key}");
            // TvList.newBind().SetCacheKey("XmDw").Load("GetSupply", new object[] { His.his.Choscode }).Bind(this.supply);
            this.dataGView1.CellValueChanged += new DataGridViewCellEventHandler(dataGView1_CellValueChanged);

            // this.dataGView1.CellEndEdit += new DataGridViewCellEventHandler(dataGView1_CellEndEdit);



            this.dataGView1.AddRow(de, 0);
            this.dataGView1.CurrentRow.Cells[eq.Index].ReadOnly = false;
        }
Exemplo n.º 23
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.EQOutSvr";
        //    ac2.Sql = "UpdateEQInDetailInfo";
        //    ac2.Add("DETAILNO", DETAILNO);
        //    ac2.Add("STOCKFLOWNO", flowno);
        //    ac2.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac0_ServiceLoad);
        //    ac2.Post();
        //}
        private void toolStripButton_Pass_Click(object sender, EventArgs e)
        {
            DataTable datatable = LData.LoadDataTable("EQOutDetailSearch", new object[] { dr["出库ID"].ToString(), His.his.Choscode });

            if (datatable != null)
            {
                foreach (DataRow r in datatable.Rows)
                {
                    if (r != null)
                    {
                        //更新库存总表信息
                        decimal before_num = 0;
                        decimal num        = Convert.ToDecimal(r["NUM"]);
                        decimal after_num  = 0;

                        ActionLoad ac0 = new ActionLoad();
                        ac0.Action = "LKWZSVR.lkeq.EQWareManag.EQOutSvr";
                        ac0.Add("EQID", r["EQID"].ToString());
                        DataTable stock_table = LData.LoadDataTable("EQOut_GetSTOCKTable", new object[] { His.his.Choscode, r["EQID"].ToString(), dr["出库库房编码"].ToString() });
                        if (stock_table != null)
                        {
                            //库存总表中存在该库房对应的这种物资,只需更新库存量
                            before_num = Convert.ToDecimal(stock_table.Rows[0]["NUM"]);

                            after_num = before_num - num;
                            if (after_num < 0)
                            {
                                WJs.alert("设备" + r["设备"] + "的现有库存数已经低于出库数,审核应为不通过!");
                                return;
                            }
                            ac0.Sql = "UpdateEQStock";

                            ac0.Add("STOCKID", stock_table.Rows[0]["STOCKID"]);
                            ac0.Add("NUM", after_num);
                        }

                        ac0.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac0_ServiceLoad);
                        ac0.Post();
                        //LData.Exe("GetSTOCKID", null, new object[] { His.his.Choscode, r["WZID"].ToString(), dr["入库库房编码"].ToString() });
                        //string stockid_1 = LData.Es("GetSTOCKID", null, new object[] { His.his.Choscode, r["WZID"].ToString(), dr["入库库房编码"].ToString() });
                        // string dep =  r["DETAILNO"].ToString();

                        //更新库存流水表
                        ActionLoad ac1 = new ActionLoad();
                        ac1.Action = "LKWZSVR.lkeq.EQWareManag.EQInSvr";
                        ac1.Sql    = "SaveEQStockDetail";
                        ac1.Add("FLOWNO", r["STOCKFLOWNO"].ToString());
                        string  outnum = LData.Es("EQGetOutNum", null, new object[] { r["STOCKFLOWNO"].ToString() });
                        decimal num1   = Convert.ToDecimal(outnum) + num;
                        ac1.Add("OUTNUM", num1);

                        //ac1.Add("OUTID", r["OUTID"].ToString());
                        //ac1.Add("WARECODE", dr["出库库房编码"].ToString());
                        //string stockid_s;
                        //// string befornum = "0";
                        //if (stock_table != null)
                        //{
                        //    stockid_s = stock_table.Rows[0]["STOCKID"].ToString();

                        //}
                        //else
                        //{
                        //    stockid_s = LData.Es("EQGetSTOCKId", null, new object[] { His.his.Choscode, r["EQID"].ToString(), dr["出库库房编码"].ToString() });
                        //}
                        //ac1.Add("STOCKID", stockid_s);
                        //ac1.Add("BEFORENUM", before_num);
                        //ac1.Add("NUM", num);

                        //ac1.Add("UNITCODE", r["UNITCODE"]);
                        //ac1.Add("OUTNUM", 0);
                        //ac1.Add("CARDNUM",0);
                        //ac1.Add("GG", r["GG"]);
                        //ac1.Add("XH", r["XH"]);
                        //ac1.Add("CD", r["CD"]);
                        //ac1.Add("PRICE", r["PRICE"]);
                        //ac1.Add("MONEY", r["MONEY"]);
                        //ac1.Add("OTHERMONEY", r["OTHERMONEY"]);

                        //ac1.Add("TOTALPRICE", r["TOTALPRICE"]);
                        //ac1.Add("TOTALMONEY", r["TOTALMONEY"]);
                        //ac1.Add("SUPPLYID", r["SUPPLYID"]);
                        //ac1.Add("SUPPLYNAME", r["SUPPLYNAME"]);
                        //ac1.Add("PRODUCTDATE", Convert.ToDateTime(r["PRODUCTDATE"]));
                        //ac1.Add("VALIDDATE", Convert.ToDateTime(r["VALIDDATE"]));
                        //ac1.Add("MEMO", r["MEMO"]);
                        //ac1.Add("TXM", r["TXM"]);


                        //ac1.Add("RECIPECODE", dr["单据号"].ToString());
                        //ac1.Add("SHDH", dr["随货单号"].ToString());
                        //ac1.Add("GHSUPPLYID", dr["供货商ID"].ToString());
                        //ac1.Add("GHSUPPLYNAME", dr["供货商名称"].ToString());
                        //ac1.Add("INDATE", DateTime.Now);
                        //ac1.Add("CHOSCODE", His.his.Choscode);


                        //ac1.Add("DETAILNO", r["DETAILNO"]);//用于更新出库细表

                        ac1.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac0_ServiceLoad);
                        ac1.Post();
                        ////更新入库细表的库存流水号
                        //ActionLoad ac2 = new ActionLoad();
                        //ac2.Action = "LKWZSVR.lkwz.WZIn.WZInDan";
                        //ac2.Sql = "UpdateWZInDetailInfo";
                        //ac2.Add("DETAILNO", r["DETAILNO"].ToString());
                        //ac2.Add("STOCKFLOWNO", r["FLOWNO"].ToString());
                        //if (dr["采购计划流水号"] != null)
                        //{
                        //    ActionLoad ac3 = new ActionLoad();
                        //    ac3.Action = "LKWZSVR.lkwz.WZPlan.WZPlanMain";
                        //    ac3.Sql = "Save";
                        //    ac3.Add("PLANID", dr["采购计划流水号"].ToString());
                        //    ac3.Add("STATUS", 6);
                        //    ac3.Add("SHINDATE", DateTime.Now);
                        //    ac3.Add("SHINUSERID", His.his.UserId);
                        //    ac3.Add("SHINUSERNAME", His.his.UserName);
                        //    ac3.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
                        //    ac3.Post();
                        //}
                    }
                }


                ActionLoad ac = new ActionLoad();
                ac.Action = "LKWZSVR.lkeq.EQWareManag.EQOutSvr";
                ac.Sql    = "ChuKuDanUpdate";
                ac.Add("SHINDATE", DateTime.Now);
                ac.Add("STATUS", 6);
                ac.Add("OUTID", dr["出库ID"].ToString());
                ac.Add("SHINUSERID", His.his.UserId);
                ac.Add("SHINUSERNAME", His.his.UserName);
                ac.ServiceLoad += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad_SHTG);
                ac.Post();
            }
        }
Exemplo n.º 24
0
        private void EQIn_Add_Load(object sender, EventArgs e)//加载窗体
        {
            this.WindowState = FormWindowState.Maximized;
            str2             = LData.Es("EQSystemValue_2204", null, new object[] { His.his.Choscode });
            str1             = LData.Es("EQSystemValue_2203", null, new object[] { His.his.Choscode });

            this.toolStripButton_Pass.Visible = false;
            this.toolStripButton_Down.Visible = false;
            if (isAdd == 1)
            {
                this.InWare_selTextInpt.Text    = inware_name;
                this.InWare_selTextInpt.Value   = inware_id;
                this.InWare_selTextInpt.Enabled = false;
            }
            this.InWay_selTextInpt.Sql      = "EQGetOutWareWay";
            this.InWay_selTextInpt.SelParam = His.his.Choscode + "|{key}|{key}|{key}|{key}";



            this.dataGView1.Url = "EQOutDetailSearch";

            this.dataGView1.addSql("GetOutEQ_StockFlow", "库存流水号", "", His.his.Choscode + "|" + "|{key}|{key}|{key}|{key}");

            TvList.newBind().SetCacheKey("XmDw1").Load("EQIn_DanWeiBianMa", null).Bind(this.Column3);


            if (isAdd != 1)
            {
                this.InWay_selTextInpt.Text   = LData.Exe("EQGetOutWareWayName", null, new object[] { His.his.Choscode, dr["出库方式ID"].ToString() });
                this.InWare_selTextInpt.Text  = LData.Exe("EQGetOutWareName", null, new object[] { His.his.Choscode, dr["出库库房编码"].ToString() });
                this.InWay_selTextInpt.Value  = dr["出库方式ID"].ToString();
                this.InWare_selTextInpt.Value = dr["出库库房编码"].ToString();

                inware_id   = dr["出库库房编码"].ToString();
                inware_name = dr["出库库房编码_Text"].ToString();
                this.InWare_selTextInpt.Enabled = false;


                this.totalmoney_yTextBox.Text = dr["总金额"].ToString();

                this.dateTimePicker2.Value = dr["制单日期"].ToDateTime();
                this.dataGView1.reLoad(new object[] { dr["出库ID"].ToString(), His.his.Choscode });

                if (isAdd == 2)
                {
                    for (int i = 0; i < this.dataGView1.RowCount; i++)
                    {
                        dataGView1.addSql("GetOutEQ_StockFlow", "库存流水号", "", this.dataGView1.Rows[i].Cells[eqid.Index].Value.ToString() +
                                          "|" + this.inware_id + "|" + His.his.Choscode);
                        if (this.dataGView1.Rows[i].Cells[yzf.Index].Value.ToString().Trim() != "" && this.dataGView1.Rows[i].Cells[num.Index].Value.ToString() != "0")
                        {
                            this.dataGView1.Rows[i].Cells[Column5.Index].Value = decimal.Parse(this.dataGView1.Rows[i].Cells[yzf.Index].Value.ToString()) / decimal.Parse(this.dataGView1.Rows[i].Cells[num.Index].Value.ToString());
                        }
                        // this.dataGView1.Rows[i].Cells[Column9.Index].Value = LData.Es("GetOutEQ_StockNum", null, new object[] { this.dataGView1.Rows[i].Cells[eqid.Index].Value.ToString(), inware_id, His.his.Choscode });
                    }
                }
                for (int i = 0; i < this.dataGView1.RowCount; i++)
                {
                    this.dataGView1.Rows[i].Cells[Column9.Index].Value = LData.Es("GetOutEQ_StockNum", null, new object[] { this.dataGView1.Rows[i].Cells[eqid.Index].Value.ToString(), inware_id, His.his.Choscode });
                }
                this.memo_yTextBox.Text = dr["备注"].ToString();
                this.dataGView1.Columns[eq.Index].ReadOnly = true;

                this.cancel_toolStripButton.Enabled = false;
                if (isAdd == 3)
                {
                    this.toolStrip1.Enabled             = true;
                    this.add_toolStripButton.Visible    = false;
                    this.save_toolStripButton.Visible   = false;
                    this.DeleButton.Visible             = false;
                    this.cancel_toolStripButton.Visible = false;
                    this.toolStripButton_Pass.Visible   = false;
                    this.toolStripButton_Down.Visible   = false;
                    this.dataGView1.ReadOnly            = true;
                    this.InWare_selTextInpt.Enabled     = false;
                    this.InWay_selTextInpt.Enabled      = false;
                    this.dateTimePicker2.Enabled        = false;
                    this.memo_yTextBox.ReadOnly         = true;
                }
                if (isAdd == 4)
                {
                    this.toolStrip1.Enabled          = true;
                    this.add_toolStripButton.Visible = false;

                    this.save_toolStripButton.Visible   = false;
                    this.DeleButton.Visible             = false;
                    this.cancel_toolStripButton.Visible = false;
                    this.toolStripButton_Pass.Visible   = true;
                    this.toolStripButton_Down.Visible   = true;
                    this.dataGView1.ReadOnly            = true;
                    this.InWare_selTextInpt.Enabled     = false;
                    this.InWay_selTextInpt.Enabled      = false;
                    this.dateTimePicker2.Enabled        = false;
                    this.memo_yTextBox.ReadOnly         = true;
                }



                this.dataGView1.CellValueChanged += new DataGridViewCellEventHandler(dataGView1_CellValueChanged);
                //BindUnit();
            }


            dataGView1.RowToXml += new RowToXmlHandle(dataGView1_RowToXml);
        }
Exemplo n.º 25
0
        private void btn_Save_Click(object sender, EventArgs e)
        {
            if (this.yTextBox_Name.Text.Trim().Length == 0)
            {
                WJs.alert("请输入类别名称!");
                this.yTextBox_Name.Focus();
                return;
            }

            if (this.ytDateTime_Start.Value == null)
            {
                WJs.alert("请选择开始日期!");
                ytDateTime_Start.Focus();
                return;
            }
            if (this.ytDateTime_End.Value == null)
            {
                WJs.alert("请选择结束日期!");
                ytDateTime_End.Focus();
                return;
            }
            if (this.ytDateTime_End.Value.Date <= this.ytDateTime_Start.Value.Date)
            {
                WJs.alert("开始日期必须大于结束日期!");
                ytDateTime_Start.Focus();
                return;
            }
            /////////////////////////////////////////////////////////////////////////

            if (!isAdd)
            {
                str = LData.Es("EQIfIsTheDate_DateDivide_Add1", null, new object[] { His.his.Choscode, Info["期间划分ID"].ToInt() });
            }
            else
            {
                str = LData.Es("EQIfIsTheDate_DateDivide_Add", null, new object[] { His.his.Choscode });
            }

            if (str != null)
            {
                if (ytDateTime_Start.Value < DateTime.Parse(str))
                {
                    WJs.alert("开始日期必须大于上一个期间划分里的结束日期!");
                    ytDateTime_Start.Focus();
                    return;
                }
            }

            ActionLoad ac = ActionLoad.Conn();

            ac.Action = "LKWZSVR.lkeq.JiChuDictionary.EQDateDivideSvr";
            ac.Sql    = "SaveDateDivideInfo";
            ac.Add("DATENAME", this.yTextBox_Name.Text);
            ac.Add("USERID", His.his.UserId);
            ac.Add("USERNAME", His.his.UserName);
            ac.Add("CHOSCODE", His.his.Choscode);

            ac.Add("BEGINDATE", this.ytDateTime_Start.Value.Date.ToShortDateString());
            ac.Add("ENDDATE", this.ytDateTime_End.Value.Date.ToShortDateString());
            ac.Add("MEMO", this.yTextBox_Rec.Text);

            if (!isAdd)
            {
                ac.Add("DATEID", Info["期间划分ID"].ToInt());
            }
            else
            {
                ac.Add("DATEID", null);
            }
            ac.ServiceLoad    += new YtClient.data.events.LoadEventHandle(ac_ServiceLoad);
            ac.ServiceFaiLoad += new YtClient.data.events.LoadFaiEventHandle(ac_ServiceFaiLoad);
            ac.Post();
        }
Exemplo n.º 26
0
        private void EQIn_Add_Load(object sender, EventArgs e)//加载窗体
        {
            this.WindowState = FormWindowState.Maximized;
            str2             = LData.Es("EQSystemValue_2204", null, new object[] { His.his.Choscode });
            str1             = LData.Es("EQSystemValue_2203", null, new object[] { His.his.Choscode });

            this.toolStripButton_Pass.Visible = false;
            this.toolStripButton_Down.Visible = false;
            if (isAdd == 1)
            {
                this.InWare_selTextInpt.Text    = inware_name;
                this.InWare_selTextInpt.Value   = inware_id;
                this.InWare_selTextInpt.Enabled = false;
            }
            this.InWay_selTextInpt.Sql      = "EQGetInWareWay";
            this.InWay_selTextInpt.SelParam = His.his.Choscode + "|{key}|{key}|{key}|{key}";

            this.gys_selTextInpt.Sql      = "EQGetGYS";
            this.gys_selTextInpt.SelParam = "{key}|{key}|{key}|{key}";
            this.dataGView1.Url           = "EQInDetailSearch";
            //TvList.newBind().SetCacheKey("XmDw").Load("EQGetSupply", new object[] { His.his.Choscode }).Bind(this.supply);
            this.dataGView1.addSql("EQGetSupply", "生产厂家", "", His.his.Choscode + "|" + "|{key}|{key}|{key}|{key}");

            TvList.newBind().SetCacheKey("XmDw1").Load("EQIn_DanWeiBianMa", null).Bind(this.Column3);


            //dwList = TvList.newBind().SetCacheKey("XmDw").Load("GetWZUnit2", new object[] { His.his.Choscode });
            //dwList.Bind(this.unit);
            if (isAdd != 1)
            {
                this.InWay_selTextInpt.Text     = LData.Exe("EQGetInWareWayName", null, new object[] { His.his.Choscode, dr["入库方式ID"].ToString() });
                this.InWare_selTextInpt.Text    = LData.Exe("EQGetInWareName", null, new object[] { His.his.Choscode, dr["入库库房编码"].ToString() });
                this.InWay_selTextInpt.Value    = dr["入库方式ID"].ToString();
                this.InWare_selTextInpt.Value   = dr["入库库房编码"].ToString();
                this.InWare_selTextInpt.Enabled = false;
                this.SHDH_yTextBox.Text         = dr["随货单号"].ToString();
                this.fpcode_yTextBox.Text       = dr["发票号码"].ToString();
                this.totalmoney_yTextBox.Text   = dr["总金额"].ToString();
                this.lstotalmoney_yTextBox.Text = dr["发票金额"].ToString();
                this.yTextBox_YzfMoney.Text     = dr["运杂费金额"].ToString();
                if (!dr["发票日期"].IsNull)
                {
                    this.dateTimePicker1.Value = dr["发票日期"].ToDateTime();
                }
                if (!dr["采购人"].IsNull)
                {
                    this.yTextBox_CGpeople.Text = dr["采购人"].ToString();
                }
                //dwList = TvList.newBind().SetCacheKey("XmDw").Load("GetWZUnit2", new object[] { His.his.Choscode });
                //dwList.Bind(this.unit);
                this.gys_selTextInpt.Text  = dr["供货商名称"].ToString();
                this.gys_selTextInpt.Value = dr["供货商ID"].ToString();
                this.memo_yTextBox.Text    = dr["备注"].ToString();
                this.dataGView1.Columns[eq.Index].ReadOnly = true;
                this.dataGView1.reLoad(new object[] { dr["入库ID"].ToString(), His.his.Choscode });
                this.cancel_toolStripButton.Enabled   = false;
                this.fromplan_toolStripButton.Enabled = false;
                if (isAdd == 3)
                {
                    this.toolStrip1.Enabled               = true;
                    this.add_toolStripButton.Visible      = false;
                    this.fromplan_toolStripButton.Visible = false;
                    this.save_toolStripButton.Visible     = false;
                    this.DeleButton.Visible               = false;
                    this.cancel_toolStripButton.Visible   = false;
                    this.toolStripButton_Pass.Visible     = false;
                    this.toolStripButton_Down.Visible     = false;


                    this.dataGView1.ReadOnly        = true;
                    this.InWare_selTextInpt.Enabled = false;
                    this.InWay_selTextInpt.Enabled  = false;
                    this.gys_selTextInpt.Enabled    = false;
                    this.fpcode_yTextBox.ReadOnly   = true;
                    this.dateTimePicker1.Enabled    = false;
                    this.SHDH_yTextBox.ReadOnly     = true;
                    this.memo_yTextBox.ReadOnly     = true;
                }
                if (isAdd == 4)
                {
                    this.toolStrip1.Enabled               = true;
                    this.add_toolStripButton.Visible      = false;
                    this.fromplan_toolStripButton.Visible = false;
                    this.save_toolStripButton.Visible     = false;
                    this.DeleButton.Visible               = false;
                    this.cancel_toolStripButton.Visible   = false;
                    this.toolStripButton_Pass.Visible     = true;
                    this.toolStripButton_Down.Visible     = true;
                    this.dataGView1.ReadOnly              = true;
                    this.InWare_selTextInpt.Enabled       = false;
                    this.InWay_selTextInpt.Enabled        = false;
                    this.gys_selTextInpt.Enabled          = false;
                    this.fpcode_yTextBox.ReadOnly         = true;
                    this.dateTimePicker1.Enabled          = false;
                    this.SHDH_yTextBox.ReadOnly           = true;
                    this.memo_yTextBox.ReadOnly           = true;
                }



                this.dataGView1.CellValueChanged += new DataGridViewCellEventHandler(dataGView1_CellValueChanged);
                //BindUnit();
            }


            dataGView1.RowToXml += new RowToXmlHandle(dataGView1_RowToXml);
        }
Exemplo n.º 27
0
             private void EQKeepAccountsManagEdit_Load(object sender, EventArgs e)
        {
            this.toolStrip1.Visible = false;
          
                 this.reportman_selText.TextChanged+=new EventHandler(reportman_selText_TextChanged);
                 
            IOID_selText.Sql = "GetKind_EQAccount";
            IOID_selText.SelParam = His.his.Choscode + "|{key}|{key}";

            reportman_selText.Sql = "YongHuMingInfo_EQAccount";
            reportman_selText.SelParam = His.his.Choscode + "|{key}|{key}";


          //this.NextCheckdate_dateTimePicker.Value = dt;
            TvList.newBind().add("作废", "0").add("有效", "1").Bind(Status_ytComboBox1);
            this.Status_ytComboBox1.SelectedIndex = 1;
            this.Status_ytComboBox1.Enabled = false;
            this.Userid_textBox.ReadOnly = true;
            this.Username_textBox.ReadOnly = true;
            this.choscode_textBox.ReadOnly = true;


            cardId_textBox.Value = drZ["卡片ID"].ToString();
            cardId_textBox.Text = drZ["卡片ID"].ToString();

            
            this.deptid_selTextInpt.Value = drZ["使用科室"].ToString();
            this.deptid_selTextInpt.Text = LData.Es("GetEQAskBuy_KSName_KeepFit", null, new object[] { His.his.Choscode, drZ["使用科室"].ToString() });

            if (isFlag == 0 || isFlag == 1 || isFlag == 3 || isFlag == 4 )
            {
                LoadInfo_EQFixManagEdit();
                if (isFlag == 0)
                {
                    this.Save_button.Enabled = false;


                }
            }
            else
            {
                recdate_dateTimePicker.Value = DateTime.Now;
                Userid_textBox.Text = His.his.UserId.ToString();
                Username_textBox.Text = His.his.UserName;
                choscode_textBox.Text = His.his.Choscode;
            }

            if (isFlag == 3)
            {
                this.Save_button.Enabled = false;
                this.toolStrip1.Visible = true;
                this.toolStrip_JDPass.Visible = true;
                this.toolStrip_JDNo.Visible = true;
                this.toolStrip_SHPass.Visible = false;
                this.toolStrip_SHNo.Visible = false;
                this.textBox_JDUSERID.Text = His.his.UserId.ToString();
                this.textBox_JDMAN.Text = His.his.UserName;

            }
            if (isFlag == 4)
            {
                this.Save_button.Enabled = false;
                this.toolStrip1.Visible = true;
                this.toolStrip_JDPass.Visible = false;
                this.toolStrip_JDNo.Visible = false;
                this.toolStrip_SHPass.Visible = true;
                this.toolStrip_SHNo.Visible = true;
                this.textBox_SHUSERID.Text = His.his.UserId.ToString();
                this.textBox_SHMAN.Text = His.his.UserName;
            }  
       
      
        }
Exemplo n.º 28
0
 //根据系统Id2203来求精确度 获取2   这里调用时 ,为了简便我直接写值 f2
 private int GetSysDanWei(int Id)
 {
     return(Convert.ToInt32(LData.Es("GetSysDanWeiInEQDiaoBoEdit", null, new object[] { Id })));
 }