Exemplo n.º 1
0
        private void be_newposition_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            Frm_freeBit frm_free = new Frm_freeBit();
            BI01        bi01     = null;

            if (frm_free.ShowDialog() == DialogResult.OK)
            {
                s_new_bi001 = frm_free.swapdata["bi001"].ToString();
                if (s_new_bi001 == ac01.AC015)
                {
                    Tools.msg(MessageBoxIcon.Warning, "提示", "新墓穴位置与原来相同!");
                    return;
                }
                bi01 = session1.GetObjectByKey(typeof(BI01), s_new_bi001) as BI01;
                if (bi01 != null)
                {
                    if (bi01.PRICE != ac01.AC020)
                    {
                        if (XtraMessageBox.Show("新墓穴位置与原位置定价不同,是否继续?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
                        {
                            return;
                        }
                    }
                    be_newposition.Text    = MiscAction.GetTombPosition(bi01.BI001);
                    te_new_price.EditValue = bi01.PRICE;
                }
            }
            frm_free.Dispose();
        }
Exemplo n.º 2
0
        private void buttonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            Frm_freeBit frm_free = new Frm_freeBit();

            if (frm_free.ShowDialog() == DialogResult.OK)
            {
                s_bi001 = frm_free.swapdata["bi001"].ToString();
                bi01    = session1.GetObjectByKey(typeof(BI01), s_bi001) as BI01;
                if (bi01 != null)
                {
                    be_position.Text = MiscAction.GetTombPosition(bi01.BI001);
                }
            }
            frm_free.Dispose();
        }
Exemplo n.º 3
0
        /// <summary>
        /// 调用 选择墓位
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void be_position_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            if (s_action == "bookin")
            {
                return;
            }
            Frm_freeBit frm_free = new Frm_freeBit();

            if (frm_free.ShowDialog() == DialogResult.OK)
            {
                s_bi001 = frm_free.swapdata["bi001"].ToString();
                bi01    = unitOfWork1.GetObjectByKey(typeof(BI01), s_bi001) as BI01;
                if (bi01 != null)
                {
                    be_position.Text      = MiscAction.GetTombPosition(bi01.BI001);
                    te_fixprice.EditValue = bi01.PRICE;
                    te_price.EditValue    = bi01.PRICE;
                    le_mx.EditValue       = bi01.BI005;

                    if (bi01.PRICE > 0)
                    {
                        te_fixprice.ReadOnly = true;
                    }
                    else
                    {
                        te_fixprice.ReadOnly = false;
                    }

                    if (bi01.BI005 != null)
                    {
                        le_mx.ReadOnly = true;
                    }
                    else
                    {
                        le_mx.ReadOnly = false;
                    }
                }
            }
            frm_free.Dispose();
        }