Exemple #1
0
 private void SaveData()
 {
     this.info            = this.baseinfo.GetData();
     this.educationinfo   = this.education.GetData();
     this.foodsafeinfo    = this.foodsafe.GetData();
     this.jtinfo          = this.jtsafe.GetData();
     this.ldpersoninfo    = this.ldperson.GetData();
     this.safeproduceinfo = this.safeproduce.GetData();
     this.xfsafeinfo      = this.xfsafe.GetData();
 }
Exemple #2
0
        private void ViewCompanyInfo()
        {
            BaseInfo        baseinfo      = new BaseInfo();
            EducationInfo   educationinfo = new EducationInfo();
            FoodSafeInfo    foodinfo      = new FoodSafeInfo();
            JTsafeInfo      jtinfo        = new JTsafeInfo();
            LDpersonInfo    ldinfo        = new LDpersonInfo();
            SafeProduceInfo spinfo        = new SafeProduceInfo();
            XFsafeInfo      xfinfo        = new XFsafeInfo();

            try
            {
                string    strSql = "Select * From CompanyInfo where Id = " + Convert.ToInt32(this.dataGridView1.SelectedRows[0].Cells[0].Value) + "";
                DataTable dt     = SqlHelper.dataTable(strSql);
                if (dt.Rows.Count == 0)
                {
                    return;
                }
                baseinfo.CompanyName      = dt.Rows[0][1].ToString();
                baseinfo.Faren            = dt.Rows[0][2].ToString();
                baseinfo.FaPhoneNum       = dt.Rows[0][3].ToString();
                baseinfo.CompanyAddressA  = dt.Rows[0][4].ToString();
                baseinfo.CompanyAddressB  = dt.Rows[0][5].ToString();
                baseinfo.ChenBaoPerson    = dt.Rows[0][6].ToString();
                baseinfo.ChenBaoPhoneNum  = dt.Rows[0][7].ToString();
                baseinfo.ChenBaoAddress   = dt.Rows[0][8].ToString();
                baseinfo.HasYingyeId      = dt.Rows[0][9].ToString();
                baseinfo.JingYingContent  = dt.Rows[0][10].ToString();
                baseinfo.ZhuceNum         = dt.Rows[0][11].ToString();
                baseinfo.CompanyPersonNum = dt.Rows[0][12].ToString();
                baseinfo.HasShiTang       = dt.Rows[0][13].ToString();
                baseinfo.EatPersonNum     = dt.Rows[0][14].ToString();
                baseinfo.ChangDi          = dt.Rows[0][15].ToString();
                baseinfo.SleepPersonNum   = dt.Rows[0][16].ToString();
                baseinfo.JianzhuSquere    = dt.Rows[0][17].ToString();
                baseinfo.JianzhuType      = dt.Rows[0][18].ToString();
                baseinfo.CompanyStatus    = dt.Rows[0][19].ToString();
                baseinfo.PhotoPath1       = (byte[])dt.Rows[0][20];
                baseinfo.PhotoPath2       = (byte[])dt.Rows[0][21];
                baseinfo.PhotoPath3       = (byte[])dt.Rows[0][22];


                educationinfo.Type = dt.Rows[0][23].ToString();
                if (dt.Rows[0][24] != null)
                {
                    educationinfo.BuidTime = Convert.ToDateTime(dt.Rows[0][24]);
                }
                educationinfo.ClassNum            = dt.Rows[0][25].ToString();
                educationinfo.HouseType           = dt.Rows[0][26].ToString();
                educationinfo.StudentNum          = dt.Rows[0][27].ToString();
                educationinfo.HouseProperty       = dt.Rows[0][28].ToString();
                educationinfo.TeacherNum          = dt.Rows[0][29].ToString();
                educationinfo.OwnerProperty       = dt.Rows[0][30].ToString();
                educationinfo.OwnerName           = dt.Rows[0][31].ToString();
                educationinfo.ZhandiSquere        = dt.Rows[0][32].ToString();
                educationinfo.HuodongSquere       = dt.Rows[0][33].ToString();
                educationinfo.SchoolJianzhuSquere = dt.Rows[0][34].ToString();

                foodinfo.CompanyType = dt.Rows[0][35].ToString();
                foodinfo.HasLicense  = dt.Rows[0][36].ToString();
                foodinfo.LicenseName = dt.Rows[0][37].ToString();


                jtinfo.StrCarNum = dt.Rows[0][38].ToString();
                jtinfo.IsProf    = dt.Rows[0][39].ToString();
                jtinfo.TranBy    = dt.Rows[0][40].ToString();
                jtinfo.TranType  = dt.Rows[0][41].ToString();

                ldinfo.LivePersonNum  = dt.Rows[0][42].ToString();
                ldinfo.LiveHouseNum   = dt.Rows[0][43].ToString();
                ldinfo.HouseFloorNum  = dt.Rows[0][44].ToString();
                ldinfo.GetWarmStyle   = dt.Rows[0][45].ToString();
                ldinfo.HasWarnning    = dt.Rows[0][46].ToString();
                ldinfo.HirePersonType = dt.Rows[0][47].ToString();
                ldinfo.HasPromiseBook = dt.Rows[0][48].ToString();
                ldinfo.IsBackUp       = dt.Rows[0][49].ToString();
                ldinfo.BuildSquere    = dt.Rows[0][50].ToString();
                ldinfo.OwnerPerson    = dt.Rows[0][51].ToString();
                ldinfo.Telephone      = dt.Rows[0][52].ToString();

                spinfo.SP1     = dt.Rows[0][53].ToString();
                spinfo.SP2     = dt.Rows[0][54].ToString();
                spinfo.SP3     = dt.Rows[0][55].ToString();
                spinfo.SP4     = dt.Rows[0][56].ToString();
                spinfo.SP5     = dt.Rows[0][57].ToString();
                spinfo.SP6     = dt.Rows[0][58].ToString();
                spinfo.SP7     = dt.Rows[0][59].ToString();
                spinfo.SP8     = dt.Rows[0][60].ToString();
                spinfo.SP9     = dt.Rows[0][61].ToString();
                spinfo.SP10    = dt.Rows[0][62].ToString();
                spinfo.SP11    = dt.Rows[0][63].ToString();
                spinfo.SP12    = dt.Rows[0][64].ToString();
                spinfo.SP13    = dt.Rows[0][65].ToString();
                spinfo.SP14    = dt.Rows[0][66].ToString();
                spinfo.SP15    = dt.Rows[0][67].ToString();
                spinfo.SP16    = dt.Rows[0][68].ToString();
                spinfo.SP17    = dt.Rows[0][69].ToString();
                spinfo.SP18    = dt.Rows[0][70].ToString();
                spinfo.SP19    = dt.Rows[0][71].ToString();
                spinfo.SP20    = dt.Rows[0][72].ToString();
                spinfo.SP21    = dt.Rows[0][73].ToString();
                spinfo.SP22    = dt.Rows[0][74].ToString();
                spinfo.SP23    = dt.Rows[0][75].ToString();
                spinfo.SP24    = dt.Rows[0][76].ToString();
                spinfo.SP25    = dt.Rows[0][77].ToString();
                spinfo.SP26    = dt.Rows[0][78].ToString();
                spinfo.SP27    = dt.Rows[0][79].ToString();
                spinfo.SP28    = dt.Rows[0][80].ToString();
                spinfo.SP29    = dt.Rows[0][81].ToString();
                spinfo.SP30    = dt.Rows[0][82].ToString();
                spinfo.SP31    = dt.Rows[0][83].ToString();
                spinfo.SP32    = dt.Rows[0][84].ToString();
                spinfo.SP33    = dt.Rows[0][85].ToString();
                spinfo.SP34    = dt.Rows[0][86].ToString();
                spinfo.SP35    = dt.Rows[0][87].ToString();
                spinfo.SP36    = dt.Rows[0][88].ToString();
                spinfo.SP37    = dt.Rows[0][89].ToString();
                spinfo.SP38    = dt.Rows[0][90].ToString();
                spinfo.SP39    = dt.Rows[0][91].ToString();
                spinfo.SP40    = dt.Rows[0][92].ToString();
                spinfo.SP41    = dt.Rows[0][93].ToString();
                spinfo.YinHNum = dt.Rows[0][94].ToString();


                xfinfo.ManagerName   = dt.Rows[0][95].ToString();
                xfinfo.XFTelephone   = dt.Rows[0][96].ToString();
                xfinfo.HasSafeSystem = dt.Rows[0][97].ToString();
                xfinfo.DianXiaoJian  = dt.Rows[0][98].ToString();
                xfinfo.HasSafeBook   = dt.Rows[0][99].ToString();

                AddCompanyInfo companydlg = new AddCompanyInfo(baseinfo, educationinfo, foodinfo, jtinfo, ldinfo, spinfo, xfinfo);
                companydlg.ShowDialog();
            }
            catch
            {
            }
        }
Exemple #3
0
 public AddCompanyInfo(BaseInfo info, EducationInfo educationinfo, FoodSafeInfo foodsafeinfo,
                       JTsafeInfo jtinfo, LDpersonInfo ldpersoninfo, SafeProduceInfo safeproduceinfo, XFsafeInfo xfsafeinfo)
 {
     bModify = true;
     InitializeComponent();
     this.baseinfo.SetData(info);
     this.education.SetData(educationinfo);
     this.foodsafe.SetData(foodsafeinfo);
     this.jtsafe.SetData(jtinfo);
     this.ldperson.SetData(ldpersoninfo);
     this.safeproduce.SetData(safeproduceinfo);
     this.xfsafe.SetData(xfsafeinfo);
     if (Global.authority == Authority.Looker)
     {
         this.okBtn.Enabled    = false;
         this.AddjgBtn.Enabled = false;
     }
     else
     {
         this.okBtn.Enabled    = true;
         this.AddjgBtn.Enabled = true;
     }
 }