Ejemplo n.º 1
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();
                bitId    = RegisterAction.GetBitId(regionId, bitDesc);

                be_position.Text = RegisterAction.GetBitFullName(regionId, bitDesc);
                bitPrice         = RegisterAction.GetBitPrice(regionId, bitDesc);
                if (bitPrice % 12 != 0)
                {
                    XtraMessageBox.Show("号位单价必须是12的倍数!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    bitPrice = 0;
                    return;
                }

                txtedit_price.EditValue = bitPrice;
                this.CalcHJ();
            }
        }
Ejemplo n.º 2
0
        private void Frm_registerOut_Load(object sender, EventArgs e)
        {
            rc001 = this.swapdata["RC001"].ToString();

            OracleDataReader reader = SqlAssist.ExecuteReader("select * from rc01 where rc001='" + rc001 + "'");

            while (reader.Read())
            {
                txtEdit_rc001.Text      = rc001;
                txtEdit_rc109.EditValue = reader["RC109"];
                txtEdit_rc003.EditValue = reader["RC003"];
                txtEdit_rc303.EditValue = reader["RC303"];
                rg_rc002.EditValue      = reader["RC002"];
                rg_rc202.EditValue      = reader["RC202"];
                txtEdit_rc004.EditValue = reader["RC004"];
                txtEdit_rc404.EditValue = reader["RC404"];
                txtEdit_rc150.EditValue = reader["RC150"];                   //寄存到期日期
                be_position.EditValue   = RegisterAction.GetRegPathName(rc001);

                price = RegisterAction.GetBitPrice(reader["RC130"].ToString());
                txtEdit_price.EditValue = price;

                int diff = RegisterAction.CalcOutDiffDays(rc001);

                int compare = string.Compare(Convert.ToDateTime(reader["RC150"]).ToString("yyyyMMdd"), DateTime.Now.ToString("yyyyMMdd"));
                if (compare == 0)
                {
                    checkEdit1.Enabled   = false;
                    txtEdit_nums.Enabled = false;
                }
                else if (compare > 0)                  //退费
                {
                    lc_1.Text = "剩余天数";
                    lc_2.Text = "应退费年份(年限)";
                    lc_3.Text = "退费金额";
                    isrefund  = true;
                    ///佳木斯东郊不用退费
                    txtEdit_nums.EditValue = 0;
                    txtEdit_fee.EditValue  = 0;
                }
                else
                {
                    lc_1.Text = "过期天数";
                    lc_2.Text = "应补费年份(年限)";
                    lc_3.Text = "补费金额";

                    txtEdit_nums.EditValue = Math.Round((diff * 1.0f) / 365, 2);
                    txtEdit_fee.EditValue  = Convert.ToDecimal(Math.Round((diff * 1.0f) / 365, 2)) * price;
                }


                txtEdit_diff.EditValue = diff;
            }

            ////是否允许取消迁出补退 /////
            //if(Tools.GetRight(Envior.cur_userId,"02070") == "0")
            //{
            checkEdit1.Enabled = false;
            //}
        }
Ejemplo n.º 3
0
        private void Frm_registerOut_Load(object sender, EventArgs e)
        {
            rc001 = this.swapdata["RC001"].ToString();
            OracleDataReader reader = SqlAssist.ExecuteReader("select * from rc01 where rc001='" + rc001 + "'");

            while (reader.Read())
            {
                txtEdit_rc001.Text      = rc001;
                txtEdit_rc109.EditValue = reader["RC109"];                              //寄存证号
                txtEdit_rc003.EditValue = reader["RC003"];                              //逝者姓名
                txtEdit_rc303.EditValue = reader["RC303"];                              //逝者姓名2
                rg_rc002.EditValue      = reader["RC002"];                              //性别
                rg_rc202.EditValue      = reader["RC202"];                              //性别2
                txtEdit_rc004.EditValue = reader["RC004"];                              //年龄
                txtEdit_rc404.EditValue = reader["RC404"];
                txtEdit_rc150.EditValue = reader["RC150"];                              //寄存到期日期
                be_position.EditValue   = RegisterAction.GetRegPathName(rc001);

                //price = Math.Round(  RegisterAction.GetBitPrice(reader["RC130"].ToString()) / 12, 0);
                price = RegisterAction.GetBitPrice(reader["RC130"].ToString());
                txtEdit_price.EditValue = price;

                //比较到期日期 (判断是否应该补或退)
                compare = string.Compare(Convert.ToDateTime(reader["RC150"]).ToString("yyyyMMdd"), DateTime.Now.ToString("yyyyMMdd"));

                //设置补退信息
                this.SetBTInfo();
            }


            //TODO 5. 根据权限设置 是否允许补退费
            checkEdit1.Enabled = true;
        }
Ejemplo n.º 4
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();
                bitId    = RegisterAction.GetBitId(regionId, bitDesc);

                be_position.Text        = RegisterAction.GetBitFullName(regionId, bitDesc);
                bitPrice                = RegisterAction.GetBitPrice(regionId, bitDesc);
                txtedit_price.EditValue = bitPrice;

                this.CalcHJ();
            }
        }
Ejemplo n.º 5
0
        private void Frm_registerOut_Load(object sender, EventArgs e)
        {
            rc001 = this.swapdata["RC001"].ToString();

            OracleDataReader reader = SqlAssist.ExecuteReader("select * from rc01 where rc001='" + rc001 + "'");

            while (reader.Read())
            {
                txtEdit_rc001.Text      = rc001;
                txtEdit_rc109.EditValue = reader["RC109"];
                txtEdit_rc003.EditValue = reader["RC003"];
                txtEdit_rc303.EditValue = reader["RC303"];
                rg_rc002.EditValue      = reader["RC002"];
                rg_rc202.EditValue      = reader["RC202"];
                txtEdit_rc004.EditValue = reader["RC004"];
                txtEdit_rc404.EditValue = reader["RC404"];
                txtEdit_rc150.EditValue = reader["RC150"];                   //寄存到期日期
                be_position.EditValue   = RegisterAction.GetRegPathName(rc001);

                price = Math.Round(RegisterAction.GetBitPrice(reader["RC130"].ToString()) / 12, 0);
                txtEdit_price.EditValue = price;

                int diff = RegisterAction.CalcOutDiffDays(rc001);

                int compare = string.Compare(Convert.ToDateTime(reader["RC150"]).ToString("yyyyMMdd"), DateTime.Now.ToString("yyyyMMdd"));
                if (compare == 0)
                {
                    checkEdit1.Enabled   = false;
                    txtEdit_nums.Enabled = false;
                }
                else if (compare > 0)                  //退费
                {
                    lc_1.Text = "剩余天数";
                    lc_2.Text = "应退费月数";
                    lc_3.Text = "退费金额";
                    isrefund  = true;

                    txtEdit_nums.EditValue = Math.Round((diff * 1.0f) / 30, 0);
                    txtEdit_fee.EditValue  = Convert.ToDecimal(Math.Round((diff * 1.0f) / 30, 0)) * price;
                }
                else
                {
                    lc_1.Text = "过期天数";
                    lc_2.Text = "应补费月数";
                    lc_3.Text = "补费金额";

                    txtEdit_nums.EditValue = Math.Round((diff * 1.0f) / 30, 0);
                    txtEdit_fee.EditValue  = Convert.ToDecimal(Math.Round((diff * 1.0f) / 30, 0)) * price;
                }


                txtEdit_diff.EditValue = diff;
            }

            //TODO 5. 根据权限设置 是否允许补退费
            //权限检查
            if (!AppAction.CheckRight("迁出时允许选择补退"))
            {
                checkEdit1.Enabled = false;
            }
        }