Esempio n. 1
0
        private void SaveMyVitlNew(int i)
        {
            int j = 0;

            int      id             = 0;
            string   first_name     = dataGridViewX1.Rows[i].Cells[listStringNkname1[j]].Value.ToString();
            string   Last_name      = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            string   Father_name    = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            string   Mather_name    = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            Int64    natiol_id      = ClassConvert.Convint64(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            bool?    Gender         = ClassConvert.ConvBoolMelaFemalNUll(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            string   where_birth    = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            DateTime data_barthday  = ClassConvert.ConvDateTime(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            string   Hanei_whare    = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            string   Hanei_whare1   = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            string   adderas        = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            string   e_mail         = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            int      Stutes_Jtma3   = ClassConvert.ConvToStatesF(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            int      Phone_Ground   = ClassConvert.Convint(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            int      Phone_Mobile1  = ClassConvert.Convint(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            int      Phone_Mobile2  = ClassConvert.Convint(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            string   Facebook       = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            int      whatsApp       = ClassConvert.Convint(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            int      viper          = ClassConvert.Convint(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            string   Twiter         = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            string   study          = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            int      yearstudy      = ClassConvert.ConvToStady(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);;
            int      Id_course      = ClassConvert.Convint(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            string   Id_course_Ware = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            DateTime data_regs      = ClassConvert.ConvDateTime(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);

            System.Drawing.Image Image_id_nationl1 = null;
            System.Drawing.Image Image_id_nationl2 = null;
            System.Drawing.Image image             = null;
            System.Drawing.Image Image_font        = null;

            int    bitd_id     = ClassConvert.ConvintBoloed(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            string Nkname      = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            string nameEnglish = dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value.ToString();
            int    Z1          = ClassConvert.ConvSizeToint(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            int    z2          = ClassConvert.Convint(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);
            int    z3          = ClassConvert.ConvSizeToint(dataGridViewX1.Rows[i].Cells[listStringNkname1[++j]].Value);

            System.Xml.XmlDataDocument XmlHobbies = null;



            Vitl vitl1 = new Vitl(id, first_name, Last_name, Father_name, Mather_name, natiol_id, Gender, where_birth, data_barthday, Hanei_whare, Hanei_whare1, adderas, e_mail, Stutes_Jtma3, Phone_Ground, Phone_Mobile1, Phone_Mobile2, Facebook, Twiter, whatsApp, viper, study, yearstudy, Id_course, Id_course_Ware, data_regs, Image_id_nationl1, Image_id_nationl2, image, Image_font, bitd_id, Nkname, nameEnglish, Z1, z2, z3, XmlHobbies);

            Sqldatabasethrding.SqlSaveAdderAndBack(vitl1);
        }