Exemplo n.º 1
0
        private void gridView1_MouseMove(object sender, MouseEventArgs e)
        {
            GridHitInfo hInfo = gridView1.CalcHitInfo(new Point(e.X, e.Y));
            int         i_layerNum;

            if (hInfo.InRow && hInfo.Column != null && hInfo.InRowCell)
            {
                panel_info.Visible = true;
                i_layerNum         = gridView1.RowCount - hInfo.RowHandle;
                string s_bi003 = gridView1.GetRowCellValue(hInfo.RowHandle, hInfo.Column).ToString();
                string s_bi001 = RegAction.GetBitId(curRegionId, i_layerNum, s_bi003);
                BI01   bi01    = session1.GetObjectByKey <BI01>(s_bi001);
                if (bi01 != null)
                {
                    lc_position.Text = RegAction.GetBitFullName(curRegionId, i_layerNum, s_bi003);
                    lc_price.Text    = string.Format("{0:C2}", bi01.BI009);

                    if (bi01.STATUS == "1")
                    {
                        lc_status.Text = "占用";
                    }
                    if (bi01.STATUS == "9")
                    {
                        lc_status.Text = "空闲";
                    }
                    if (bi01.STATUS == "8")
                    {
                        lc_status.Text = "待缴费";
                    }

                    if (bi01.STATUS != "1")
                    {
                        lc_name_header.Visible = false;
                        lc_name.Visible        = false;
                    }
                    else
                    {
                        lc_name_header.Visible = true;
                        lc_name.Visible        = true;

                        RC01 rc01 = session1.GetObjectByKey <RC01>(bi01.BI010);
                        if (rc01 != null)
                        {
                            lc_name.Text = rc01.RC003;
                        }
                    }
                }
            }
            else
            {
                panel_info.Visible = false;
            }
        }
Exemplo n.º 2
0
        private void be_newposition_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            Frm_FreeBit frm_free = new Frm_FreeBit();

            frm_free.swapdata["parent"] = this;

            if (frm_free.ShowDialog() == DialogResult.OK)
            {
                string regionId, bitDesc;
                int    i_bi005;
                regionId            = this.swapdata["regionId"].ToString();
                bitDesc             = this.swapdata["bitDesc"].ToString();
                i_bi005             = Convert.ToInt32(this.swapdata["bi005"]);
                s_bitId_new         = RegAction.GetBitId(regionId, i_bi005, bitDesc);
                be_newposition.Text = RegAction.GetBitFullName(regionId, i_bi005, bitDesc);
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 选择寄存位置
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void be_position_Click(object sender, EventArgs e)
        {
            Frm_FreeBit frm_free = new Frm_FreeBit();

            frm_free.swapdata["parent"] = this;

            if (frm_free.ShowDialog() == DialogResult.OK)
            {
                regionId = this.swapdata["regionId"].ToString();
                bitDesc  = this.swapdata["bitDesc"].ToString();
                i_bi005  = Convert.ToInt32(this.swapdata["bi005"]);

                bitId                   = RegAction.GetBitId(regionId, i_bi005, bitDesc);
                be_position.Text        = RegAction.GetBitFullName(regionId, i_bi005, bitDesc);
                bitPrice                = RegAction.GetBitPrice(regionId, i_bi005, bitDesc);
                txtedit_price.EditValue = bitPrice;

                this.CalcHJ();
            }
        }