Ejemplo n.º 1
0
 private void frmConsQuery_Load(object sender, System.EventArgs e)
 {
     this.FillComboBox(cmbAssType, "AT", "vcCommName", "all");
     this.FillComboBox(cmbConsType, "PT", "vcCommName", "all");
     this.sbtnExcel.Enabled    = false;
     this.cmbGoodsName.Enabled = false;
     this.cmbConsFlag.Items.Add("全部");
     this.cmbConsFlag.Items.Add("正常消费");
     this.cmbConsFlag.Items.Add("已撤销");
     if (SysInitial.CurOps.strLimit == "LM003")
     {
         this.FillComboBox(this.cmbDept, "MD", "vcCommName", "all");
         this.cmbDept.SelectedIndex = 0;
         Exception err = null;
         this.cmbOper.Items.Clear();
         DataTable dtOperList = cs.GetConsOperList("all", out err);
         if (dtOperList != null && dtOperList.Rows.Count >= 0)
         {
             this.FillComboBox(this.cmbOper, dtOperList, "vcOperName", "all");
             this.cmbOper.SelectedIndex = 0;
         }
     }
     else
     {
         string strDeptName = this.GetColCh(SysInitial.LocalDept, "MD");
         this.cmbDept.Items.Add(strDeptName);
         this.cmbDept.SelectedIndex = 0;
         this.cmbDept.Enabled       = false;
         Exception err = null;
         this.cmbOper.Items.Clear();
         DataTable dtOperList = cs.GetConsOperList("all", out err);
         if (dtOperList != null && dtOperList.Rows.Count >= 0)
         {
             this.FillComboBox(this.cmbOper, dtOperList, "vcOperName", "all");
             this.cmbOper.SelectedIndex = 0;
         }
     }
     this.DgBind();
 }
Ejemplo n.º 2
0
        private void frmFillQuery_Load(object sender, System.EventArgs e)
        {
            this.cmbType.Items.Add("全部");
            this.cmbType.Items.Add("现金充值");
            this.cmbType.Items.Add("银行卡充值");
            this.cmbType.Items.Add("消费");
            this.FillComboBox(cmbAssType, "AT", "vcCommName", "allExcRetail");
            this.sbtnExcel.Enabled = false;
            strTmp22                = "";
            this.label7.Visible     = true;
            this.label8.Visible     = true;
            this.label9.Visible     = true;
            this.label10.Visible    = true;
            this.txtFee.Visible     = true;
            this.txtTolProm.Visible = true;
            if (this.cmbType.Text.Trim() == "全部")
            {
                this.label7.Visible     = false;
                this.label8.Visible     = false;
                this.label9.Visible     = false;
                this.label10.Visible    = false;
                this.txtFee.Visible     = false;
                this.txtTolProm.Visible = false;
                strTmp22 = "22";
            }
            if (this.cmbType.Text.Trim() == "消费")
            {
                this.label7.Visible     = true;
                this.label8.Visible     = true;
                this.label9.Visible     = false;
                this.label10.Visible    = false;
                this.txtFee.Visible     = true;
                this.txtTolProm.Visible = false;
                this.label7.Text        = "总消费金额";
                strTmp22 = "33";
            }
            if (this.cmbType.Text.Trim() == "银行卡充值")
            {
                strTmp22         = "44";
                this.label7.Text = "银行卡充值总金额";
            }
            if (this.cmbType.Text.Trim() == "现金充值")
            {
                strTmp22         = "55";
                this.label7.Text = "现金充值总金额";
            }

            Exception err = null;

            this.cmbOper.Items.Clear();
            DataTable dtOperList = cs.GetConsOperList("all", out err);

            if (dtOperList != null && dtOperList.Rows.Count >= 0)
            {
                this.FillComboBox(this.cmbOper, dtOperList, "vcOperName", "all");
                this.cmbOper.SelectedIndex = 0;
            }

            if (SysInitial.CurOps.strLimit == "LM003")
            {
                this.FillComboBox(this.cmbDept, "MD", "vcCommName", "all");
                this.cmbDept.SelectedIndex = 0;
            }
            else
            {
                string strDeptName = this.GetColCh(SysInitial.LocalDept, "MD");
                this.cmbDept.Items.Add(strDeptName);
                this.cmbDept.SelectedIndex = 0;
                this.cmbDept.Enabled       = false;
            }
            this.DgBind();
        }