private async void buttonX1_Click(object sender, EventArgs e) { if (AssingDateGetWebSite.DownloadDataFromWebCliend.LoginSet(true)) { try { AssingDateGetWebSite.DownloadDataFromWebCliend.ENDASSINGSHOW(idAssingPHPid); foreach (vitelAssingInformation vitelAssingInformation1 in Alldatesee) { Valuation Valuation1 = (new Valuation(0, vitelAssingInformation1.GetidInformation(), this.nameusername, vitelAssingInformation1.GetIDform(), vitelAssingInformation1.XDocumentconvert(), DateTime.Now)); await Sqldatabasethrding.SqlSaveVitl(Valuation1.adder()); } this.Close(); } catch (Exception ev) { MegBox.Show(ev.Message); } } else { MegBox.Show("لا يوجد إنترنت"); } }
private async void buttonX3_Click(object sender, EventArgs e) { buttonX3.Enabled = false; SqlInfor = new SqlCommand(); for (int i = 0; i < Sqlcom.Parameters.Count; i++) { for (int j = 0; j < SqlInfor.Parameters.Count; j++) { if (SqlInfor.Parameters[j].ParameterName == Sqlcom.Parameters[i].ParameterName) { goto Up; } } SqlInfor.Parameters.Add(new System.Data.SqlClient.SqlParameter(Sqlcom.Parameters[i].ParameterName, Sqlcom.Parameters[i].Value)); goto End; Up: SqlInfor.Parameters.Add(new System.Data.SqlClient.SqlParameter(Sqlcom.Parameters[i].ParameterName + "1", Sqlcom.Parameters[i].Value)); End: ; } dataGridViewX1.Rows.Clear(); await Sqldatabasethrding.WaitSqlsersh(textBoxX1.Text, SerchAdvaCours, idJop, idTema, checkBoxX1.Checked, information, SqlInfor, dataGridViewX1, dateTimeInput1.Value, dateTimeInput2.Value); buttonX3.Enabled = true; }
public static async Task <bool> RetHaveVitelACtiv(int ID_informtion) { System.Data.SqlClient.SqlCommand Sqlcom = new System.Data.SqlClient.SqlCommand("SELECT [Id] FROM [HR_SARC].[dbo].[Team_ta] where [ID_informtion] = @ID_informtion and [Delete] = 0 and Date_End is null"); Sqlcom.Parameters.AddWithValue("ID_informtion", ID_informtion); await Sqldatabasethrding.openConction(); Sqlcom.Connection = Sqldatabasethrding.SqlConnection1; System.Data.SqlClient.SqlDataReader Rader = await Sqlcom.ExecuteReaderAsync(); try { while (await Rader.ReadAsync()) { return(true); } } catch (Exception e) { ErrorClass.SaveErrorFile(e); } finally { Rader.Close(); } return(false); }
private async void buttonX1_Click(object sender, EventArgs e) { if (CvTeamNeed == null) { CvTeamNeed = new CvTeamNeed(0, textBoxX1.Text); if (await Sqldatabasethrding.SqlSaveVitl(CvTeamNeed.adder())) { MegBox.Show("تم الإضافة", this); this.Close(); } else { MegBox.Show("هناك خطأ!", this); } } else { CvTeamNeed = new CvTeamNeed(CvTeamNeed.id, textBoxX1.Text); if (await Sqldatabasethrding.SqlSaveVitl(CvTeamNeed.updata())) { MegBox.Show("تم تعديل", this); this.Close(); } else { MegBox.Show("هناك خطأ!", this); } } }
public static List <Team> GetByGetbyIdNameName(int id, bool Ative) { List <Team> Lista = new List <Team>(); string sqlCommand = "SELECT [Id],[date_Start] ,[Date_End],[ID_informtion],[id_NameTeam_Ta],[Id_Jop_Ta] ,[Setewation],[Delete] FROM [HR_SARC].[dbo].[Team_ta] where [Delete] = 0 and [id_NameTeam_Ta] = @id "; if (Ative) { sqlCommand += " And ( [Date_End] is null ) "; for (int i = 0; i < Team.ListNotAllAtive.Count; i++) { sqlCommand += " And [Setewation] !=" + Team.ListNotAllAtive[i].ToString(); } } System.Data.SqlClient.SqlCommand SqlComm = new System.Data.SqlClient.SqlCommand(sqlCommand); SqlComm.Parameters.AddWithValue("@id", id); Task <List <List <object> > > temp = Sqldatabasethrding.GetSql(SqlComm); while (!temp.IsCompleted) { } List <List <object> > Adw = temp.Result; for (int i = 0; i < Adw.Count; i++) { if (Adw[i].Count != 0) { Lista.Add(new Team(Convert.ToInt32(Adw[i][0]), ClassConvert.ConvDateTimeNull(Adw[i][1]), ClassConvert.ConvDateTimeNull(Adw[i][2]), Convert.ToInt32(Adw[i][3]), Convert.ToInt32(Adw[i][4]), Convert.ToInt32(Adw[i][5]), Convert.ToInt32(Adw[i][6]))); } } return(Lista); }
public static async System.Threading.Tasks.Task <int> Serch(string ByIdArchev) { ByIdArchev = ClassDataGridViewDo.Trimall(ByIdArchev); System.Data.SqlClient.SqlCommand Sqlcom = new System.Data.SqlClient.SqlCommand(""); Sqlcom.CommandText = "SELECT [HR_SARC]. dbo.CV_Info.id , [HR_SARC].dbo.CV_Info.NmuberOfArchev , [HR_SARC]. dbo.CV_Study.Sampl FROM [HR_SARC].dbo.CV_Info INNER JOIN [HR_SARC].dbo.CV_Study on [HR_SARC].[dbo].CV_Info.Id_Study = [HR_SARC].[dbo].CV_Study.id WHERE [HR_SARC].dbo.CV_Study.Sampl + CAST( [HR_SARC].dbo.CV_Info.NmuberOfArchev as nvarchar) like @ByIdArchev "; Sqlcom.Parameters.AddWithValue("@ByIdArchev", ByIdArchev); List <CV_Info> Ve = new List <CV_Info>(); List <List <object> > Ob = await Sqldatabasethrding.GetSql(Sqlcom); for (int i = 0; i < Ob.Count; i++) { if (Ob[i].Count != 0) { try { return(Convert.ToInt32(Ob[i][0])); } catch (Exception e) { ErrorClass.SaveErrorFile(e); } } } return(-1); }
private async void buttonX1_Click(object sender, EventArgs e) { System.Data.SqlClient.SqlCommand fe = new System.Data.SqlClient.SqlCommand(" SELECT [HR_SARC].[dbo].[Information_Ta].[Id] ,[HR_SARC].[dbo].[Information_Ta].[first_name]+ N' '+ [HR_SARC].[dbo].[Information_Ta].[Last_name] as fullname , study , yearstudy,data_regs FROM [HR_SARC].[dbo].[Information_Ta] where [HR_SARC].[dbo].[Information_Ta].study like @study and [Delete] = 0 "); System.Data.SqlClient.SqlCommand fce = new System.Data.SqlClient.SqlCommand(" SELECT [HR_SARC].[dbo].[Information_Ta].[Id] FROM [HR_SARC].[dbo].[Information_Ta] INNER JOIN [HR_SARC].[dbo].[Couress_ta] ON [HR_SARC].[dbo].[Information_Ta].[Id] = [HR_SARC].[dbo].[Couress_ta].[Id_Information] where [HR_SARC].[dbo].[Couress_ta].[id_NameOfCouress] = 1003 and [HR_SARC].[dbo].[Information_Ta].[Delete] = 0 "); string stringx = ClassDataGridViewDo.LograthemChangEverAleffToAll("تصاد", true); fce.Parameters.AddWithValue("@study", "%" + stringx + "%"); fe.Parameters.AddWithValue("@study", "%" + stringx + "%"); List <List <object> > ef = await Sqldatabasethrding.GetSql(fe); List <List <object> > ef1 = await Sqldatabasethrding.GetSql(fce); for (int i = 0; i < ef.Count; i++) { dataGridViewX1.Rows.Add(ef[i][0].ToString(), ef[i][1].ToString(), ef[i][2].ToString(), ef[i][3].ToString(), "", Convert.ToDateTime(ef[i][4]).ToShortDateString(), Convert.ToDateTime(ef[i][4]).ToLongDateString()); } for (int i = 0; i < ef1.Count; i++) { for (int j = 0; j < dataGridViewX1.Rows.Count; j++) { if (ef1[i][0].ToString() == dataGridViewX1.Rows[j].Cells[0].Value.ToString()) { dataGridViewX1.Rows[j].Cells[4].Value = "كوارث"; break; } } } }
public static List <Couress> GetByIdVil(int id, bool JustSecscc = false) { List <Couress> Lista = new List <Couress>(); System.Data.SqlClient.SqlCommand SqlComm = new System.Data.SqlClient.SqlCommand("SELECT [Id],[id_NameOfCouress],[Id_Information],[NumberOfdayregest],[Result] FROM [HR_SARC].[dbo].[Couress_ta] where Id_Information = @id and [Delete] = 0"); if (JustSecscc) { SqlComm.CommandText += " and [Result] >= @RetultSect"; SqlComm.Parameters.AddWithValue("RetultSect", RetultSect); } SqlComm.Parameters.AddWithValue("@id", id); Task <List <List <object> > > temp = Sqldatabasethrding.GetSql(SqlComm); while (!temp.IsCompleted) { } List <List <object> > Adw = temp.Result; for (int i = 0; i < Adw.Count; i++) { if (Adw[i].Count != 0) { Lista.Add(new Couress(Convert.ToInt32(Adw[i][0]), Convert.ToInt32(Adw[i][1]), Convert.ToInt32(Adw[i][2]), Convert.ToInt32(Adw[i][3]), Convert.ToSingle(Adw[i][4]))); } } return(Lista); }
public async static void SetUpAll() { #region ConvertIdBranchToString ConvertIdBranchToString.Add("حلب"); ConvertIdBranchToString.Add("حلب-سفيرة"); ConvertIdBranchToString.Add("حلب-الباب"); ConvertIdBranchToString.Add("حلب-عفرين"); ConvertIdBranchToString.Add("حلب- أروم الكبرى"); #endregion #region SewtWationDec SewtWationDec.Add("أساسي"); SewtWationDec.Add("رديف"); SewtWationDec.Add("موظف"); SewtWationDec.Add("دوار"); SewtWationDec.Add("غير فعال"); SewtWationDec.Add("مسافر"); SewtWationDec.Add("منقطع"); #endregion await Sqldatabasethrding.SqlGetAllNnameTeam(NameTeam.GetAll()); await Sqldatabasethrding.SqlGetAllJob(Jop.GetAll()); await Sqldatabasethrding.SqlGetAllTypeOfCouress(TypeofCouress.GetAll()); }
private async void buttonX1_Click(object sender, EventArgs e) { if (Qustiones1 != null) { await Sqldatabasethrding.SqlSaveVitl(Qustiones1.Delete()); this.DialogResult = DialogResult.OK; } }
private void buttonItem2_Click(object sender, EventArgs e) { for (int n = 0; dataGridViewX1.Rows.Count - 1 > 0; n++) { #region Adder int id = 0; string first_name = ClassConvert.ConvString(dataGridViewX1.Rows[n].Cells[1].Value); string Last_name = ClassConvert.ConvString(dataGridViewX1.Rows[n].Cells[2].Value); string Father_name = ClassConvert.ConvString(dataGridViewX1.Rows[n].Cells[3].Value); string Mather_name = ClassConvert.ConvString(dataGridViewX1.Rows[n].Cells[4].Value); Int64 natiol_id = ClassConvert.Convint64(dataGridViewX1.Rows[n].Cells[8].Value); bool Gender = ClassConvert.ConvBool(dataGridViewX1.Rows[n].Cells[5].Value); string where_birth = ClassConvert.ConvString(dataGridViewX1.Rows[n].Cells[6].Value); DateTime data_barthday = ClassConvert.ConvDateTime(dataGridViewX1.Rows[n].Cells[7].Value); string e_mail = ClassConvert.ConvString(dataGridViewX1.Rows[n].Cells[18].Value); int Phone_Ground = ClassConvert.Convint(dataGridViewX1.Rows[n].Cells[20].Value); int Phone_Mobile1 = ClassConvert.Convint(dataGridViewX1.Rows[n].Cells[19].Value); string study = ClassConvert.ConvString(dataGridViewX1.Rows[n].Cells[9].Value); int yearstudy = ClassConvert.Convint(dataGridViewX1.Rows[n].Cells[10].Value); int Id_course = ClassConvert.Convint(dataGridViewX1.Rows[n].Cells[0].Value); string Id_course_Ware = ClassConvert.ConvString(dataGridViewX1.Rows[n].Cells[21].Value); DateTime data_regs = ClassConvert.ConvDateTime(dataGridViewX1.Rows[n].Cells[17].Value); int bitd_id = ClassConvert.Convint(dataGridViewX1.Rows[n].Cells[11].Value); string nameEnglish = ClassConvert.ConvString(dataGridViewX1.Rows[n].Cells[12].Value); int Z1 = ClassConvert.Convint(dataGridViewX1.Rows[n].Cells[13].Value); int z2 = ClassConvert.Convint(dataGridViewX1.Rows[n].Cells[14].Value); int z3 = ClassConvert.Convint(dataGridViewX1.Rows[n].Cells[15].Value); string Hanei_whare = ""; string Hanei_whare1 = ""; string adderas = ""; int Stutes_Jtma3 = ClassConvert.Convint(dataGridViewX1.Rows[n].Cells[16].Value); int Phone_Mobile2 = 0; string Facebook = ""; int whatsApp = 0; int viper = 0; string Twiter = ""; 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; string Nkname = ""; System.Xml.XmlDataDocument XmlHobbies = null;; /* * string[] liststring = System.IO.Directory.GetFiles(".\\", "Hobbis1.xml", System.IO.SearchOption.AllDirectories); * XmlHobbies.Load(liststring[0]);*/ #endregion Vitl vitltemp = 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.SqlSaveVitl(vitltemp.adder()); } }
private async void buttonX2_Click(object sender, EventArgs e) { AdderNameForTeam AdderNameForTeam1 = new AdderNameForTeam(); AdderNameForTeam1.NameTeam = NameTeam; if (AdderNameForTeam1.ShowDialog() == System.Windows.Forms.DialogResult.OK) { await Sqldatabasethrding.SqlSaveVitl(AdderNameForTeam1.Team.adder()); UpdateTheNewAdderOrEdit(); } }
private void buttonX1_Click(object sender, EventArgs e) { Sqldatabasethrding.SqlAddOrUpdateOrDelet(ClassConvert.ConvertListInterfaseToDataBase(CouressList), IntAdderCoress, IntEditCoress, IntDeletCoress); CouressList = Couress.GetByNameOfCores(NameOfCouress.id); VitlByIdList.Clear(); foreach (Couress Couressv in CouressList) { VitlByIdList.Add(Vitl.VitlIdAndName(Couressv.Id_Information)); } ClassDataGridViewDo.DataGridEnterGridToWorkNameOfCouress_ta(dataGridViewX1, CouressList, VitlByIdList); }
private async void buttonX2_Click(object sender, EventArgs e) { AdderTameType AdderTameType = new AdderTameType(); if (AdderTameType.ShowDialog() == System.Windows.Forms.DialogResult.OK) { await Sqldatabasethrding.SqlSaveVitl(AdderTameType.NameTeamType.adder()); NameTeamType.NameTeamTypeStatic = NameTeamType.GetAll(); ClassDataGridViewDo.DataGridEnterGridFornameTeamTypeOption(dataGridViewX1, NameTeamType.NameTeamTypeStatic); } }
private async void buttonX3_Click(object sender, EventArgs e) { try { dataGridViewX1.Enabled = false; ClassDataGridViewDo.ClumChekArray(NameCol, dataGridViewX1); int IdTheNameOfcoures = NameTeam.NameTeamStatic[comboBoxEx1.SelectedIndex].id; for (int i = 0; i < dataGridViewX1.Rows.Count; i++) { int id = ClassConvert.Convint(dataGridViewX1.Rows[i].Cells["id"].Value); DateTime?NuberOfDayes = ClassConvert.ConvDateTimeNull(dataGridViewX1.Rows[i].Cells["تاريخ تكليفه بالعمل"].Value); //أختبار هل الدورة مسجل عند الشخص + أنه تأكد من وجود ID if (id > 0) { Team CouresNew = new Team(0, NuberOfDayes, null, id, IdTheNameOfcoures, 1, 1); if (await Sqldatabasethrding.SqlSaveVitl(CouresNew.adder())) { dataGridViewX1.Rows[i].DefaultCellStyle.BackColor = Color.Green; } else { dataGridViewX1.Rows[i].DefaultCellStyle.BackColor = Color.Red; } } else { dataGridViewX1.Rows[i].DefaultCellStyle.BackColor = Color.Red; } } } catch (NoColumnsException ex) { ErrorClass.SaveErrorFile(ex); MessageBox.Show(string.Format(" لا يوجد عامود {0} ", ex.Message)); } catch (Exception ex) { ErrorClass.SaveErrorFile(ex); } buttonX3.Enabled = true; dataGridViewX1.Enabled = true; }
private void buttonX1_Click(object sender, EventArgs e) { Int64 NUmber = 0; if (textBoxForInationlNumber1.Text != "") { NUmber = Convert.ToInt64(textBoxForInationlNumber1.Text); } Sqldatabasethrding.WaitSqlsersh(comboBoxEx1.Text, NUmber, idVitel1.Text, dateTimeInput2.Value, dateTimeInput1.Value, progressBarX1, dataGridViewX1); }
private async void buttonX13_Click(object sender, EventArgs e) { if (MessageBoxEx.Show(this, "هل أنت متأكد من حذف المتطوع من قاعدة البيانات نهائياً ؟؟", "حذف", MessageBoxButtons.OKCancel) == System.Windows.Forms.DialogResult.OK) { if (vitl1 != null) { await Sqldatabasethrding.SqlSaveVitl(vitl1.Delete()); this.DialogResult = System.Windows.Forms.DialogResult.Abort; } } }
private async void buttonItem3_Click(object sender, EventArgs e) { AdderCouresFor AdderCouresFor1 = new AdderCouresFor(); if (AdderCouresFor1.ShowDialog() == System.Windows.Forms.DialogResult.OK) { await Sqldatabasethrding.SqlSaveVitl(AdderCouresFor1.NameOfCouress1.adder()); NameOfCouress.NameOfCouresslist = NameOfCouress.GetAll(); ClassDataGridViewDo.DataGridEnterGridToWorkNameOfCouress_ta(dataGridViewX3, NameOfCouress.NameOfCouresslist); } }
private async void buttonItem1_Click(object sender, EventArgs e) { AdderTeamName AdderTeamName1 = new AdderTeamName(null); if (AdderTeamName1.ShowDialog() == System.Windows.Forms.DialogResult.OK) { await Sqldatabasethrding.SqlSaveVitl(AdderTeamName1.NameTeam.adder()); NameTeam.NameTeamStatic = await NameTeam.GetAll(); ClassDataGridViewDo.DataGridEnterGridFornameTeamOption(dataGridViewX2, NameTeam.NameTeamStatic); } }
private async void buttonX3_Click(object sender, EventArgs e) { if (CV_i != null) { if (MessageBoxEx.Show("هل متأكد من حذف", "تأكيد الحذف", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk) == System.Windows.Forms.DialogResult.Yes) { if (await Sqldatabasethrding.SqlSaveVitl(CV_i.Delete())) { MegBox.Show("تم الحذف", this); } } } }
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); }
private async void buttonX4_Click(object sender, EventArgs e) { AdderCouresFor AdderCouresFor1 = new AdderCouresFor(); AdderCouresFor1.NameOfCouress1 = NameOfCouress; if (AdderCouresFor1.ShowDialog() == System.Windows.Forms.DialogResult.OK) { NameOfCouress = AdderCouresFor1.NameOfCouress1; await Sqldatabasethrding.SqlSaveVitl(AdderCouresFor1.NameOfCouress1.updata()); textBoxX1.Text = NameOfCouress.Decrption; comboBoxEx1.SelectedIndex = ClassDataGridViewDo.RetunIndexByIdSech(NameOfCouress.Id_TypeofCouress_ta, TypeofCouress.TypeofCouressList); } }
private async void dataGridViewX1_UserDeletingRow(object sender, DataGridViewRowCancelEventArgs e) { if (DevComponents.DotNetBar.MessageBoxEx.Show(this, String.Format(" هل متأكد من حذف {0} من هذا الفريق؟؟؟", e.Row.Cells[1].Value.ToString()), "رسالة تأكيد بحذف", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == System.Windows.Forms.DialogResult.OK) { if (await Sqldatabasethrding.SqlSaveVitl(this.TeamList[ClassDataGridViewDo.RetunIndexByIdSech(Convert.ToInt32(e.Row.Cells[0].Value), this.TeamList)].Delete())) { MegBox.Show("تم الحذف", this); } } else { e.Cancel = true; } }
public async static Task <int> CV_studyID(string W) { System.Data.SqlClient.SqlCommand sql = new System.Data.SqlClient.SqlCommand("SELECT [id] FROM [HR_SARC].[dbo].[CV_Study] where sampl = @sampl "); sql.Parameters.AddWithValue("sampl", W); List <List <object> > Sqlb = await Sqldatabasethrding.GetSql(sql); if (Sqlb.Count != 0) { return(Convert.ToInt32(Sqlb[0][0])); } else { return(NumberOfIdNotReg); } }
public async static System.Threading.Tasks.Task <int> GetTheNumberArchev(int IdStudy) { //SELECT [NmuberOfArchev] FROM [HR_SARC].[dbo].[CV_Info] where [id_study] = @id_study ORDER BY id DESC System.Data.SqlClient.SqlCommand Sql = new System.Data.SqlClient.SqlCommand("SELECT top 1 [NmuberOfArchev] FROM [HR_SARC].[dbo].[CV_Info] where [id_study] = @id_study ORDER BY NmuberOfArchev DESC"); Sql.Parameters.AddWithValue("id_study", IdStudy); List <List <object> > Op = await Sqldatabasethrding.GetSql(Sql); if (Op.Count != 0) { return(Convert.ToInt32(Op[0][0]) + 1); } else { return(1); } }
public async static Task <List <CvTeamNeed> > GetAll() { List <CvTeamNeed> Lista = new List <CvTeamNeed>(); List <List <object> > Adw = await Sqldatabasethrding.GetSql(new System.Data.SqlClient.SqlCommand("SELECT [id] ,[FullName] FROM [HR_SARC].[dbo].[CvTeamNeed] where [Delete] = 0")); for (int i = 0; i < Adw.Count; i++) { if (Adw[i].Count != 0) { Lista.Add(new CvTeamNeed(Convert.ToInt32(Adw[i][0]), Convert.ToString(Adw[i][1]))); } } return(Lista); }
public async System.Threading.Tasks.Task UpdateForGetTheCV(int ToOutTeam, DateTime?ToOutDate, string Notesout) { this.ToOutTeam = ToOutTeam; if (ToOutDate == DateTime.MinValue) { this.ToOutDate = null; } else { this.ToOutDate = ToOutDate; } this.Notesout = Notesout; await Sqldatabasethrding.SqlSaveVitl(this.updata()); }
public async static System.Threading.Tasks.Task <bool> GetHAVECVSELC(int CV_Info_ID, int Scileis_ID) { System.Data.SqlClient.SqlCommand SqlComm = new System.Data.SqlClient.SqlCommand("SELECT [id] FROM [HR_SARC].[dbo].[HaveScil] where [Delete] = 0 and CV_Info_ID = @CV_Info_ID and Scileis_ID =@Scileis_ID"); SqlComm.Parameters.AddWithValue("@CV_Info_ID", CV_Info_ID); SqlComm.Parameters.AddWithValue("@Scileis_ID", Scileis_ID); List <List <object> > Adw = await Sqldatabasethrding.GetSql(SqlComm); for (int i = 0; i < Adw.Count; i++) { if (Adw[i].Count != 0) { return(true); } } return(false); }
/// <summary> /// جلب جميع الأسماء /// </summary> /// <returns></returns> public async static Task <List <NameTeam> > GetAll() { List <NameTeam> Lista = new List <NameTeam>(); List <List <object> > Adw = await Sqldatabasethrding.GetSql(new System.Data.SqlClient.SqlCommand("SELECT [Id],[nameOftame],[NameTeamType_Id] FROM [HR_SARC].[dbo].[NameTeam_Ta] where [Delete] = 0")); for (int i = 0; i < Adw.Count; i++) { if (Adw[i].Count != 0) { Lista.Add(new NameTeam(Convert.ToInt32(Adw[i][0]), Convert.ToString(Adw[i][1]), Convert.ToInt32(Adw[i][2]))); } } return(Lista); }
private async void buttonX1_Click(object sender, EventArgs e) { if (textBoxX1.Text != "" && comboBoxEx1.SelectedIndex != -1) { TypeofCouress Type1 = new TypeofCouress(0, textBoxX1.Text, NameTeam.NameTeamStatic[comboBoxEx1.SelectedIndex].id); if (await Sqldatabasethrding.SqlSaveVitl(Type1.adder())) { this.DialogResult = System.Windows.Forms.DialogResult.OK; } else { } } else { MegBox.Show("أحد الحقول فارغه"); } }