Ejemplo n.º 1
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.º 2
0
        private void Frm_RegEdit_Load(object sender, EventArgs e)
        {
            ac001       = this.swapdata["AC001"].ToString();
            register_ds = this.swapdata["dataset"] as Register_ds;

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

            while (reader.Read())
            {
                txtEdit_rc001.EditValue = reader["RC001"];
                txtEdit_rc109.EditValue = reader["RC109"];
                txtEdit_rc003.EditValue = reader["RC003"];
                txtEdit_rc303.EditValue = reader["RC303"];
                be_position.EditValue   = RegisterAction.GetRegPathName(ac001);

                rg_rc002.EditValue      = reader["RC002"];
                rg_rc202.EditValue      = reader["RC202"];
                txtEdit_rc004.EditValue = reader["RC004"];
                txtEdit_rc404.EditValue = reader["RC404"];
                txtedit_rc014.EditValue = reader["RC014"];
                txtEdit_rc050.EditValue = reader["RC050"];
                txtEdit_rc051.EditValue = reader["RC051"];
                lookUp_rc052.EditValue  = reader["RC052"];
                txtEdit_ac055.EditValue = reader["RC055"];
                mem_rc099.EditValue     = reader["RC099"];
            }

            lookUp_rc052.Properties.DataSource    = register_ds.Relation;
            lookUp_rc052.Properties.ValueMember   = "ST003";
            lookUp_rc052.Properties.DisplayMember = "ST003";
        }
Ejemplo n.º 3
0
        private void Frm_RegisterPay_Load(object sender, EventArgs e)
        {
            string s_rc130 = string.Empty;

            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"];
                txtEdit_rc004.EditValue = reader["RC004"];
                txtEdit_rc404.EditValue = reader["RC404"];
                rg_rc002.EditValue      = reader["RC002"];
                rg_rc202.EditValue      = reader["RC202"];
                be_position.Text        = RegisterAction.GetRegPathName(rc001);

                s_rc130  = reader["RC130"].ToString();
                bitprice = Convert.ToDecimal(SqlAssist.ExecuteScalar("select bi009 from bi01 where bi001='" + s_rc130 + "'", null));
                txtedit_price.EditValue = bitprice;
            }

            rc04Adapter.SelectCommand.CommandText = "select * from v_rc04 where rc001='" + rc001 + "' order by rc020";
            rc04Adapter.Fill(dt_rc04);
            gridControl1.DataSource = dt_rc04;

            comboBox1.Text = "";
        }
Ejemplo n.º 4
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.º 5
0
        private void Frm_AdjustRegisterDate_Load(object sender, EventArgs e)
        {
            s_ac001 = this.swapdata["AC001"].ToString();
            OracleDataReader reader = SqlAssist.ExecuteReader("select * from rc01 where rc001='" + s_ac001 + "'");

            while (reader.Read())
            {
                txtEdit_rc003.EditValue = reader["RC003"];
                txtedit_pos.Text        = RegisterAction.GetRegPathName(s_ac001);
                de_begin.EditValue      = reader["RC140"];
                de_end.EditValue        = reader["RC150"];
            }
        }
Ejemplo n.º 6
0
        private void Frm_RegisterPay_Load(object sender, EventArgs e)
        {
            string s_rc130 = string.Empty;

            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"];
                txtEdit_rc004.EditValue = reader["RC004"];
                txtEdit_rc404.EditValue = reader["RC404"];
                rg_rc002.EditValue      = reader["RC002"];
                rg_rc202.EditValue      = reader["RC202"];
                be_position.Text        = RegisterAction.GetRegPathName(rc001);

                s_rc130  = reader["RC130"].ToString();
                bitprice = Convert.ToDecimal(SqlAssist.ExecuteScalar("select bi009 from bi01 where bi001='" + s_rc130 + "'", null));
                txtedit_price.EditValue = bitprice;

                //如果最后缴费日期 大于 2018-01-01 则无需混合价格
                if (string.Compare(Convert.ToDateTime(reader["RC150"]).ToString("yyyyMMdd"), "20180101") > 0)
                {
                    checkEdit1.Enabled = false;
                }
                else
                {
                    oldprice = RegisterAction.GetLastRegPrice(rc001);
                }
            }
            reader.Dispose();

            rc04Adapter.SelectCommand.CommandText = "select * from v_rc04 where rc001='" + rc001 + "' order by rc020";
            rc04Adapter.Fill(dt_rc04);
            gridControl1.DataSource = dt_rc04;

            fpAdapter.Fill(dt_fpsource);
            lookup_sa004.DataSource    = dt_fpsource;
            lookup_sa004.DisplayMember = "ITEM_TEXT";
            lookup_sa004.ValueMember   = "ITEM_ID";

            sa01Adapter.Fill(dt_sa01);
            gridControl2.DataSource = dt_sa01;

            //comboBox1.Text = "";
            this.Calc_Hj(12);
        }
Ejemplo n.º 7
0
        private void Frm_RegisterMove_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"];
                bitId_Old             = reader["RC130"].ToString();
                be_position.EditValue = RegisterAction.GetRegPathName(rc001);
            }
        }
Ejemplo n.º 8
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;
            }
        }