Exemple #1
0
        public void GetData()
        {
            List<string> lst = new List<string>();

            string where = "";

            if (GUID != Guid.Empty)
            {
                GetWhere(ref lst, GUID);
                where = string.Format("parentGUID in ({0})",
                    string.Join(",", lst.ToArray()));
            }

            BLL.ViewOperator bll = new BLL.ViewOperator();
            DataTable dt = bll.GetList(
                "V_Customer", 
                "客户编号",
                winFormPager1.PageSize, 
                winFormPager1.PageIndex, 
                where).Tables[0];

            winFormPager1.RecordCount = bll.GetListCount("V_Customer", where);

            BLL.Argument bllArgument = new BLL.Argument();
            DataTable dtbl = bllArgument.GetList("type = '客户编号'").Tables[0];

            string strNO = dtbl.Rows[0][1].ToString();

            for (int i = 0; i < dt.Rows.Count; i++)
			{
                dt.Rows[i][1] = strNO + dt.Rows[i][1];
			}

            this.dataGridView1.DataSource = dt;

            this.dataGridView1.Columns[0].Visible = false;
            this.dataGridView1.Columns[9].Visible = false;
            this.dataGridView1.Columns[10].Visible = false;
        }
Exemple #2
0
        public void GetData()
        {
            string where = "";

            if (!(GUID == Guid.Empty))
            {
                 where= "customerGUID = '" + GUID + "'";
            }

            BLL.ViewOperator bll = new BLL.ViewOperator();
            DataTable dt = bll.GetList(
                "V_Service",
                "服务编号",
                winFormPager1.PageSize,
                winFormPager1.PageIndex,
                where).Tables[0];

            winFormPager1.RecordCount = bll.GetListCount("V_Service", where);

            BLL.Argument bllArgument = new BLL.Argument();
            DataTable dtbl = bllArgument.GetList("type = '服务编号'").Tables[0];

            string strNO = dtbl.Rows[0][1].ToString();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                dt.Rows[i][1] = strNO + dt.Rows[i][1];
            }

            this.dataGridView1.DataSource = dt;

            this.dataGridView1.Columns[0].Visible = false;
            this.dataGridView1.Columns[8].Visible = false;
            this.dataGridView1.Columns[9].Visible = false;
            this.dataGridView1.Columns[10].Visible = false;
        }
Exemple #3
0
        private void cbxCustomerGroup_Leave(object sender, EventArgs e)
        {
            List<string> lst = new List<string>();

            string where = "";

            if (cbxCustomerGroup.SelectedNode.Name !=
                Guid.Empty.ToString() &&
                cbxCustomerGroup.SelectedNode.Name != null)
            {
                GetWhere(ref lst, new Guid(cbxCustomerGroup.SelectedNode.Name));
                where = string.Format("parentGUID in ({0})",
                    string.Join(",", lst.ToArray()));
            }

            BLL.ViewOperator bll = new BLL.ViewOperator();
            DataTable dt = bll.GetList("V_Customer", where).Tables[0];

            cbxName.DataSource = dt;
            cbxName.DisplayMember = "客户名称";
            cbxName.ValueMember = "GUID";
        }