Ejemplo n.º 1
0
        private void addCompany_Click(object sender, EventArgs e)
        {
            AddHireHouseInfo addInfoDlg = new AddHireHouseInfo();

            addInfoDlg.ShowDialog();
            string strSql = "Select * From HireHouse";

            this.BindData(strSql);
            this.strTempSql = strSql;
        }
Ejemplo n.º 2
0
        private void ViewHouseInfo()
        {
            HireHouse house = new HireHouse();

            try
            {
                string    strSql = "Select * From HireHouse where Name ='" + this.dataGridView1.SelectedRows[0].Cells[4].Value.ToString() + "'";
                DataTable dt     = SqlHelper.dataTable(strSql);
                if (dt.Rows.Count == 0)
                {
                    return;
                }
                house.CheckTime    = Convert.ToDateTime(dt.Rows[0][1]);
                house.BaoPianName  = dt.Rows[0][2].ToString();
                house.BaoHuName    = dt.Rows[0][3].ToString();
                house.Name         = dt.Rows[0][4].ToString();
                house.XingBie      = dt.Rows[0][5].ToString();
                house.HirePhone    = dt.Rows[0][6].ToString();
                house.NowAddress   = dt.Rows[0][7].ToString();
                house.HireType     = dt.Rows[0][8].ToString();
                house.HireUse      = dt.Rows[0][9].ToString();
                house.BuildType    = dt.Rows[0][10].ToString();
                house.YinHuanType  = dt.Rows[0][11].ToString();
                house.HouseStruct  = dt.Rows[0][12].ToString();
                house.ChuZujianNum = dt.Rows[0][13].ToString();
                house.ChuZuSquere  = dt.Rows[0][14].ToString();
                house.HirePerson1  = dt.Rows[0][15].ToString();
                house.HirePerson2  = dt.Rows[0][16].ToString();
                house.HirePerson3  = dt.Rows[0][17].ToString();
                house.HirePerson4  = dt.Rows[0][18].ToString();
                house.Dengji       = dt.Rows[0][19].ToString();
                house.Zerenshu     = dt.Rows[0][20].ToString();
                house.IsQunzu      = dt.Rows[0][21].ToString();

                house.PhotoPath = (byte[])dt.Rows[0][22];

                house.QunzuType     = dt.Rows[0][23].ToString();
                house.WarmStyle     = dt.Rows[0][24].ToString();
                house.HaszerenBook  = dt.Rows[0][25].ToString();
                house.QiandingGrade = dt.Rows[0][26].ToString();
                house.MeiluNum      = dt.Rows[0][27].ToString();
                house.BaojingNum    = dt.Rows[0][28].ToString();
                house.FengDouNum    = dt.Rows[0][29].ToString();
                house.ChennuoNum    = dt.Rows[0][30].ToString();
            }
            catch
            {
                MessageBox.Show("读取数据库出错");
            }
            AddHireHouseInfo houseinfodlg = new AddHireHouseInfo(house);

            houseinfodlg.ShowDialog();
        }