private void label16_Click(object sender, EventArgs e) // تایید { Model.shenasname item = dbcontext.shenasnames.Where(x => x.ID == GlobalVariable.shenasnameID).FirstOrDefault(); if (item.final != 1) { try { item.hadaf = hadaf.Text; item.title = title.Text; item.date = DateTime.Now; item.datePishbini = datePishbini.Text; //item.dateFrom = "";//dateFrom.GetSelectedDateInPersianDateTime().ToShortDateString().ToGeorgianDateTime(); //item.dateTo = ""; //dateTo.GetSelectedDateInPersianDateTime().ToShortDateString().ToGeorgianDateTime(); item.markaz = markazcombo.SelectedValue.ToString(); item.dastgah = dastgah.SelectedValue.ToString(); dbcontext.SaveChanges(); } catch (Exception error) { //throw; } } Form6_PMainMoney form6 = new Form6_PMainMoney(); form6.Show(); this.Hide(); // this.Hide(); }
private void pictureBox1_Click_1(object sender, EventArgs e) { Model.shenasname item = dbcontext.shenasnames.Where(x => x.ID == GlobalVariable.shenasnameID).FirstOrDefault(); if (item.final != 1) { Form3_addGam form = new Form3_addGam(); form.Show(); } }
private void pictureBox1_Click(object sender, EventArgs e) { using (var dbcontext = new Model.Context()) { Model.shenasname item = dbcontext.shenasnames.Where(x => x.ID == GlobalVariable.shenasnameID).FirstOrDefault(); if (item.final != 1) { Form20_addSayer form = new Form20_addSayer(); form.Show(); } } }
private void dataGridView1_CellContentDoubleClick_1(object sender, DataGridViewCellEventArgs e) { using (var dbcontext = new Model.Context()) { Model.shenasname item = dbcontext.shenasnames.Where(x => x.ID == GlobalVariable.shenasnameID).FirstOrDefault(); if (item.final != 1) { int iSelectedGridIndex = dataGridView1.CurrentCell.ColumnIndex; if (iSelectedGridIndex != 0) { return; } int rowindex = dataGridView1.CurrentCell.RowIndex; string rowID = dataGridView1.Rows[rowindex].Cells[2].Value.ToString(); Model.ejraeiat model = dbcontext.ejraeiats.SingleOrDefault(x => x.title == rowID); dbcontext.Entry(model).State = EntityState.Deleted; dbcontext.SaveChanges(); int index = 0; foreach (Form form in Application.OpenForms) { if (form.Name == "Form6-Money-Ejraeiat") { break; } else { index += 1; } } this.Hide(); Application.OpenForms[index - 1].Close(); Form6_PMainMoney form6 = new Form6_PMainMoney(); form6.Show(); } } }
public Form2_shenasnameAdd() { string shenasnameID = GlobalVariable.shenasnameID; Model.Context dbcontext = new Model.Context(); InitializeComponent(); FontClass fontclass = new FontClass(); List <Control> allControls = fontclass.GetAllControls(this); allControls.ForEach(k => k.Font = mostaan.GlobalVariable.headerlistFONTsmall); header.Font = mostaan.GlobalVariable.headerlistFONTBold; //dateFrom.Font = GlobalVariable.headerlistFONTsupecSmall; //dateTo.Font = GlobalVariable.headerlistFONTsupecSmall; this.MaximizeBox = false; this.CenterToScreen(); panel1.PanelElement.Shape = new RoundRectShape(); panel1.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; panel1.PanelElement.PanelFill.BackColor = Color.White; panel2.PanelElement.Shape = new RoundRectShape(); panel2.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; panel2.PanelElement.PanelFill.BackColor = Color.White; panel3.PanelElement.Shape = new RoundRectShape(); panel3.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; panel3.PanelElement.PanelFill.BackColor = Color.Violet; radPanel10.PanelElement.Shape = new RoundRectShape(); radPanel10.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel10.PanelElement.PanelFill.BackColor = Color.White; radPanel11.PanelElement.Shape = new RoundRectShape(); radPanel11.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel11.PanelElement.PanelFill.BackColor = Color.White; //radPanel12.PanelElement.Shape = new RoundRectShape(); //radPanel12.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; //radPanel12.PanelElement.PanelFill.BackColor = Color.White; radPanel13.PanelElement.Shape = new RoundRectShape(); radPanel13.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel13.PanelElement.PanelFill.BackColor = Color.White; radPanel14.PanelElement.Shape = new RoundRectShape(); radPanel14.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel14.PanelElement.PanelFill.BackColor = Color.White; radPanel16.PanelElement.Shape = new RoundRectShape(); radPanel16.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel16.PanelElement.PanelFill.BackColor = Color.Gray; radPanel1.PanelElement.Shape = new RoundRectShape(); radPanel1.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel1.PanelElement.PanelFill.BackColor = Color.Gray; List <Model.markaz> bakhshlist = dbcontext.markazs.Where(x => x.master == "1").ToList(); List <Model.markaz> bakhshlist2 = dbcontext.markazs.Where(x => x.master == "1").ToList(); markazcombo.DataSource = bakhshlist; markazcombo.DisplayMember = "title"; markazcombo.ValueMember = "parent"; dastgah.DataSource = bakhshlist2; dastgah.DisplayMember = "title"; dastgah.ValueMember = "parent"; List <Model.user> userlist = dbcontext.users.ToList(); tarah.DataSource = userlist; tarah.DisplayMember = "name"; tarah.ValueMember = "ID"; List <Model.shenasnameGam> lst = new List <Model.shenasnameGam>(); List <Model.shenasnameFounder> lstFounder = new List <Model.shenasnameFounder>(); if (shenasnameID != "") { Model.shenasname item = dbcontext.shenasnames.Where(x => x.ID == GlobalVariable.shenasnameID).FirstOrDefault(); List <string> taminIDKist = dbcontext.Archives.Where(x => x.hesab == "0").Select(x => x.shomareTamin).ToList(); List <Model.archive> arch = (from a in dbcontext.Archives where a.project == shenasnameID && a.hesab == "1" select a).ToList(); if (arch.Count() > 0) { startDate.Text = arch.First().tarikh.ToPersianDateString(); int pishbini = fns.IsDigitsOnly(item.datePishbini) == true?Int32.Parse(item.datePishbini) : 0; endDate.Text = arch.First().tarikh.AddMonths(pishbini).ToPersianDateString(); } List <Model.ejraeiat> PejraRially = dbcontext.ejraeiats.Where(x => x.shenasnameID == shenasnameID && x.riallyP != 0).ToList(); List <Model.ejraeiat> pejraDollary = dbcontext.ejraeiats.Where(x => x.shenasnameID == shenasnameID && x.dollaryP != 0).ToList(); prejraeeyat.Text = PejraRially.Count() > 0 ? string.Format("{0:n0}", PejraRially.Sum(x => x.riallyP)): "0"; pdejraiat.Text = pejraDollary.Count() > 0 ? string.Format("{0:n0}", pejraDollary.Sum(x => x.dollaryP)): "0"; List <Model.tamin> ejraRquery = dbcontext.tamins.Where(x => x.subject == "اجراییات" && x.type == "ریال" && x.hesab == "0" && x.project == shenasnameID && taminIDKist.Contains(x.shomareSanad)).ToList(); long ejraRially = ejraRquery != null?ejraRquery.ToList().Sum(x => x.mablagh) : 0; List <Model.tamin> ejraDquery = dbcontext.tamins.Where(x => x.subject == "اجراییات" && x.type == "دلار" && x.hesab == "0" && x.project == shenasnameID && taminIDKist.Contains(x.shomareSanad)).ToList(); long ejrDorllay = ejraDquery != null?ejraDquery.ToList().Sum(x => x.mablagh) : 0; hrejrayiat.Text = string.Format("{0:n0}", ejraRially.ToString()); hdejraeiat.Text = string.Format("{0:n0}", ejrDorllay.ToString()); List <Model.sarmaye> PsarRially = dbcontext.sarmayes.Where(x => x.shenasnameID == shenasnameID && x.kollPR != 0).ToList(); List <Model.sarmaye> PsarDollary = dbcontext.sarmayes.Where(x => x.shenasnameID == shenasnameID && x.kollPD != 0).ToList(); prsarmaye.Text = PsarRially.Count() > 0 ? string.Format("{0:n0}", PsarRially.Sum(x => x.kollPR)) : "0"; pdsarmaye.Text = PsarDollary.Count() > 0 ? string.Format("{0:n0}", PsarDollary.Sum(x => x.kollPD)) : "0"; List <Model.tamin> sarmaRquery = dbcontext.tamins.Where(x => x.subject == "سرمایه" && x.type == "ریال" && x.hesab == "0" && x.project == shenasnameID && taminIDKist.Contains(x.shomareSanad)).ToList(); List <Model.tamin> sarmaDquery = dbcontext.tamins.Where(x => x.subject == "سرمایه" && x.type == "دلار" && x.hesab == "0" && x.project == shenasnameID && taminIDKist.Contains(x.shomareSanad)).ToList(); long sarmRially = sarmaRquery != null?sarmaRquery.ToList().Sum(x => x.mablagh) : 0; long sarmDorllay = sarmaDquery != null?sarmaDquery.ToList().Sum(x => x.mablagh) : 0; hrsarmaye.Text = string.Format("{0:n0}", sarmRially.ToString()); hdsarmaye.Text = string.Format("{0:n0}", sarmDorllay.ToString()); List <Model.masrafi> PmasRially = dbcontext.masrafis.Where(x => x.shenasnameID == shenasnameID && x.kollPR != 0).ToList(); List <Model.masrafi> PmasDollary = dbcontext.masrafis.Where(x => x.shenasnameID == shenasnameID && x.kollPD != 0).ToList(); prmasrafi.Text = PmasRially.Count() > 0 ? string.Format("{0:n0}", PmasRially.Sum(x => x.kollPR)) : "0"; pdmasrafi.Text = PmasDollary.Count() > 0 ? string.Format("{0:n0}", PmasDollary.Sum(x => x.kollPD)) : "0"; List <Model.tamin> masrafiRquery = dbcontext.tamins.Where(x => x.subject == "مصرفی" && x.type == "ریال" && x.hesab == "0" && x.project == shenasnameID && taminIDKist.Contains(x.shomareSanad)).ToList(); List <Model.tamin> masrafiDquery = dbcontext.tamins.Where(x => x.subject == "مصرفی" && x.type == "دلار" && x.hesab == "0" && x.project == shenasnameID && taminIDKist.Contains(x.shomareSanad)).ToList(); long masrafRially = masrafiRquery != null?masrafiRquery.ToList().Sum(x => x.mablagh) : 0; long masrafDorllay = masrafiDquery != null?masrafiDquery.ToList().Sum(x => x.mablagh) : 0; hrmasrafi.Text = string.Format("{0:n0}", masrafRially.ToString()); hdmasrafi.Text = string.Format("{0:n0}", masrafDorllay.ToString()); List <Model.edari> PedaRially = dbcontext.edaris.Where(x => x.shenasnameID == shenasnameID && x.kollPR != 0).ToList(); List <Model.edari> PedaDollary = dbcontext.edaris.Where(x => x.shenasnameID == shenasnameID && x.kollPD != 0).ToList(); predari.Text = PedaRially.Count() > 0 ? string.Format("{0:n0}", PedaRially.Sum(x => x.kollPR)) : "0"; pdedari.Text = PedaDollary.Count() > 0 ? string.Format("{0:n0}", PedaDollary.Sum(x => x.kollPD)) : "0"; List <Model.tamin> edariRquery = dbcontext.tamins.Where(x => x.subject == "اداری" && x.type == "ریال" && x.hesab == "0" && x.project == shenasnameID && taminIDKist.Contains(x.shomareSanad)).ToList(); List <Model.tamin> edariDquery = dbcontext.tamins.Where(x => x.subject == "اداری" && x.type == "دلار" && x.hesab == "0" && x.project == shenasnameID && taminIDKist.Contains(x.shomareSanad)).ToList(); long edariRially = edariRquery != null?edariRquery.Sum(x => x.mablagh) : 0; long edariDorllay = edariDquery != null?edariDquery.Sum(x => x.mablagh) : 0; hredari.Text = string.Format("{0:n0}", edariRially.ToString()); hdedari.Text = string.Format("{0:n0}", edariDorllay.ToString()); List <Model.omrani> PomrRially = dbcontext.omranis.Where(x => x.shenasnameID == shenasnameID && x.kollPR != 0).ToList(); List <Model.omrani> PomrDollary = dbcontext.omranis.Where(x => x.shenasnameID == shenasnameID && x.kollPD != 0).ToList(); promrani.Text = PomrRially.Count() > 0 ? string.Format("{0:n0}", PomrRially.Sum(x => x.kollPR)) : "0"; pdomrani.Text = PomrDollary.Count() > 0 ? string.Format("{0:n0}", PomrDollary.Sum(x => x.kollPD)) : "0"; List <Model.tamin> omraniRquery = dbcontext.tamins.Where(x => x.subject == "عمرانی" && x.type == "ریال" && x.hesab == "0" && x.project == shenasnameID && taminIDKist.Contains(x.shomareSanad)).ToList(); List <Model.tamin> omraniDquery = dbcontext.tamins.Where(x => x.subject == "عمرانی" && x.type == "دلار" && x.hesab == "0" && x.project == shenasnameID && taminIDKist.Contains(x.shomareSanad)).ToList(); long omraniRially = omraniRquery != null?omraniRquery.Sum(x => x.mablagh) : 0; long omraniDorllay = omraniDquery != null?omraniDquery.Sum(x => x.mablagh) : 0; hromrani.Text = string.Format("{0:n0}", omraniRially.ToString()); hdomrani.Text = string.Format("{0:n0}", omraniDorllay.ToString()); List <Model.gharardad> PgharRially = dbcontext.gharardads.Where(x => x.shenasnameID == shenasnameID && x.kollPR != 0).ToList(); List <Model.gharardad> PgharDollary = dbcontext.gharardads.Where(x => x.shenasnameID == shenasnameID && x.kollPD != 0).ToList(); prgharardad.Text = PgharRially.Count() > 0 ? string.Format("{0:n0}", PgharRially.Sum(x => x.kollPR)) : "0"; pdgharardad.Text = PgharDollary.Count() > 0 ? string.Format("{0:n0}", PgharDollary.Sum(x => x.kollPD)) : "0"; List <Model.tamin> ghararRquery = dbcontext.tamins.Where(x => x.subject == "قرارداد" && x.type == "ریال" && x.hesab == "0" && x.project == shenasnameID && taminIDKist.Contains(x.shomareSanad)).ToList(); List <Model.tamin> ghararDquery = dbcontext.tamins.Where(x => x.subject == "قرارداد" && x.type == "دلار" && x.hesab == "0" && x.project == shenasnameID && taminIDKist.Contains(x.shomareSanad)).ToList(); long ghararRially = ghararRquery != null?ghararRquery.Sum(x => x.mablagh) : 0; long ghararDorllay = ghararDquery != null?ghararDquery.Sum(x => x.mablagh) : 0; hrgharardad.Text = string.Format("{0:n0}", ghararRially.ToString()); hdgharardad.Text = string.Format("{0:n0}", ghararDorllay.ToString()); List <Model.sayer> PsayerRially = dbcontext.sayers.Where(x => x.shenasnameID == shenasnameID && x.kollPR != 0).ToList(); List <Model.sayer> PsayerDollary = dbcontext.sayers.Where(x => x.shenasnameID == shenasnameID && x.kollPD != 0).ToList(); pravalie.Text = PsayerRially.Count() > 0 ? string.Format("{0:n0}", PsayerRially.Sum(x => x.kollPR)) : "0"; pdavalie.Text = PsayerDollary.Count() > 0 ? string.Format("{0:n0}", PsayerDollary.Sum(x => x.kollPD)) : "0"; List <Model.tamin> avalieRquery = dbcontext.tamins.Where(x => x.subject == "مواد" && x.type == "ریال" && x.hesab == "0" && x.project == shenasnameID && taminIDKist.Contains(x.shomareSanad)).ToList(); List <Model.tamin> avalieDquery = dbcontext.tamins.Where(x => x.subject == "مواد" && x.type == "دلار" && x.hesab == "0" && x.project == shenasnameID && taminIDKist.Contains(x.shomareSanad)).ToList(); long avalieRially = avalieRquery != null?avalieRquery.Sum(x => x.mablagh) : 0; long avalieDorllay = avalieDquery != null?avalieDquery.Sum(x => x.mablagh) : 0; hravalie.Text = string.Format("{0:n0}", avalieRially.ToString()); hdavalie.Text = string.Format("{0:n0}", avalieDorllay.ToString()); List <Model.tashvighi> PtashRially = dbcontext.tashvighis.Where(x => x.shenasnameID == shenasnameID && x.kollPR != 0).ToList(); List <Model.tashvighi> PtashDollary = dbcontext.tashvighis.Where(x => x.shenasnameID == shenasnameID && x.kollPD != 0).ToList(); prtashvighi.Text = PtashRially.Count() > 0 ? string.Format("{0:n0}", PtashRially.Sum(x => x.kollPR)) : "0"; pdtashvighi.Text = PtashDollary.Count() > 0 ? string.Format("{0:n0}", PtashDollary.Sum(x => x.kollPD)) : "0"; List <Model.tamin> tashvighiRquery = dbcontext.tamins.Where(x => x.subject == "تشویقی" && x.type == "ریال" && x.hesab == "0" && x.project == shenasnameID && taminIDKist.Contains(x.shomareSanad)).ToList(); List <Model.tamin> tashvighiDquery = dbcontext.tamins.Where(x => x.subject == "تشویقی" && x.type == "دلار" && x.hesab == "0" && x.project == shenasnameID && taminIDKist.Contains(x.shomareSanad)).ToList(); long tashvighiRially = tashvighiRquery != null?tashvighiRquery.Sum(x => x.mablagh) : 0; long tashvighiDorllay = tashvighiDquery != null?tashvighiDquery.Sum(x => x.mablagh) : 0; hrtashvighi.Text = string.Format("{0:n0}", tashvighiRially.ToString()); hdtashvighi.Text = string.Format("{0:n0}", tashvighiDorllay.ToString()); List <Model.tamin> sayerhazineRquery = dbcontext.tamins.Where(x => x.subject == "سایر هزینه ها" && x.type == "ریال" && x.hesab == "0" && x.project == shenasnameID && taminIDKist.Contains(x.shomareSanad)).ToList(); List <Model.tamin> sayerhazineDquery = dbcontext.tamins.Where(x => x.subject == "سایر هزینه ها" && x.type == "دلار" && x.hesab == "0" && x.project == shenasnameID && taminIDKist.Contains(x.shomareSanad)).ToList(); long sayerhazineRially = sayerhazineRquery != null?sayerhazineRquery.Sum(x => x.mablagh) : 0; long sayerhazineDorllay = sayerhazineDquery != null?sayerhazineDquery.Sum(x => x.mablagh) : 0; hrsayerhazine.Text = string.Format("{0:n0}", sayerhazineRially.ToString()); hdsayerhazine.Text = string.Format("{0:n0}", sayerhazineDorllay.ToString()); hrkoll.Text = string.Format("{0:n0}", (avalieRially + edariRially + ejraRially + ghararRially + masrafRially + omraniRially + sarmRially + sayerhazineRially + tashvighiRially).ToString());; hdkoll.Text = string.Format("{0:n0}", (avalieDorllay + edariDorllay + ejrDorllay + ghararDorllay + masrafDorllay + omraniDorllay + sarmDorllay + sayerhazineDorllay + tashvighiDorllay).ToString()); prkoll.Text = string.Format("{0:n0}", (decimal.Parse(prejraeeyat.Text) + decimal.Parse(prsarmaye.Text) + decimal.Parse(predari.Text) + decimal.Parse(prmasrafi.Text) + decimal.Parse(promrani.Text) + decimal.Parse(pravalie.Text) + decimal.Parse(prtashvighi.Text)).ToString()); pdkoll.Text = string.Format("{0:n0}", (decimal.Parse(pdejraiat.Text) + decimal.Parse(pdsarmaye.Text) + decimal.Parse(pdedari.Text) + decimal.Parse(pdmasrafi.Text) + decimal.Parse(pdomrani.Text) + decimal.Parse(pdavalie.Text) + decimal.Parse(pdtashvighi.Text)).ToString()); lst = (from p in dbcontext.shenasnameGams where p.shenasnameID == shenasnameID select p).ToList(); dataGridView1.DataSource = lst; lstFounder = (from p in dbcontext.shenasnameFounders where p.shenasnameID == shenasnameID select p).ToList(); //dataGridView2.DataSource = lstFounder; hadaf.Text = item.hadaf; title.Text = item.title; datePishbini.Text = item.datePishbini; //dateFrom.Text = item.dateFrom.ToShortDateString(); //dateTo.Text = item.dateTo.ToShortDateString(); if (item.markaz != null) { markazcombo.SelectedValue = item.markaz; dastgah.SelectedValue = item.markaz; } if (item.tarah != null) { tarah.SelectedValue = item.tarah; } } else { dataGridView1.DataSource = lst; //dataGridView2.DataSource = lstFounder; } dataGridView1.Width = 1300; dataGridView1.Columns[1].HeaderText = "گام های اصلی"; dataGridView1.Columns[1].Width = 200; dataGridView1.Columns[2].HeaderText = "عنوان اصلی فعالیت"; dataGridView1.Columns[2].Width = 200; dataGridView1.Columns[3].HeaderText = "شرح فعالیت اصلی در این گام"; dataGridView1.Columns[3].Width = 300; dataGridView1.Columns[4].HeaderText = "مدت زمان تقریبی (ماه)"; dataGridView1.Columns[4].Width = 150; dataGridView1.Columns[5].HeaderText = "درصد وزنی فعالیت"; dataGridView1.Columns[5].Width = 150; dataGridView1.Columns[6].HeaderText = "دستاورد"; dataGridView1.Columns[6].Width = 300; dataGridView1.Columns["shenasnameID"].Visible = false; dataGridView1.Columns["ID"].Visible = false; dataGridView1.Columns[6].HeaderCell.Style.Font = GlobalVariable.headerlistFONTsupecSmall; dataGridView1.Columns[1].HeaderCell.Style.Font = GlobalVariable.headerlistFONTsupecSmall; dataGridView1.Columns[2].HeaderCell.Style.Font = GlobalVariable.headerlistFONTsupecSmall; dataGridView1.Columns[3].HeaderCell.Style.Font = GlobalVariable.headerlistFONTsupecSmall; dataGridView1.Columns[4].HeaderCell.Style.Font = GlobalVariable.headerlistFONTsupecSmall; dataGridView1.Columns[5].HeaderCell.Style.Font = GlobalVariable.headerlistFONTsupecSmall; dataGridView1.Columns[6].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; dataGridView1.Columns[1].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; dataGridView1.Columns[2].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; dataGridView1.Columns[3].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; dataGridView1.Columns[4].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; dataGridView1.Columns[5].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; dataGridView1.ColumnHeadersDefaultCellStyle.BackColor = Color.Gray; dataGridView1.EnableHeadersVisualStyles = false; dataGridView1.DefaultCellStyle.Font = GlobalVariable.headerlistFONTsmall; dataGridView1.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; //Phazine.Text = String.Format("{0:n0}", pr) + " ریال و " + string.Format("{0:n0}", pd) + " دلار "; //Nhazine.Text = string.Format("{0:n0}", nr) + " ریال و " + string.Format("{0:n0}", nd) + " دلار "; }
public comment() { InitializeComponent(); FontClass fontclass = new FontClass(); List <Control> allControls = fontclass.GetAllControls(this); allControls.ForEach(k => k.Font = mostaan.GlobalVariable.headerlistFONTsmall); header.Font = mostaan.GlobalVariable.headerlistFONT; this.MaximizeBox = false; this.CenterToScreen(); //panel1.PanelElement.Shape = new RoundRectShape(); //panel1.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; //panel1.PanelElement.PanelFill.BackColor = Color.White; panel2.PanelElement.Shape = new RoundRectShape(); panel2.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; panel2.PanelElement.PanelFill.BackColor = Color.White; panel3.PanelElement.Shape = new RoundRectShape(); panel3.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; panel3.PanelElement.PanelFill.BackColor = Color.White; radPanel1.PanelElement.Shape = new RoundRectShape(); radPanel1.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel1.PanelElement.PanelFill.BackColor = Color.Violet; radPanel2.PanelElement.Shape = new RoundRectShape(); radPanel2.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel2.PanelElement.PanelFill.BackColor = Color.White; radPanel3.PanelElement.Shape = new RoundRectShape(); radPanel3.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel3.PanelElement.PanelFill.BackColor = Color.White; radPanel4.PanelElement.Shape = new RoundRectShape(); radPanel4.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel4.PanelElement.PanelFill.BackColor = Color.White; radPanel5.PanelElement.Shape = new RoundRectShape(); radPanel5.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel5.PanelElement.PanelFill.BackColor = Color.White; radPanel6.PanelElement.Shape = new RoundRectShape(); radPanel6.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel6.PanelElement.PanelFill.BackColor = Color.White; radPanel7.PanelElement.Shape = new RoundRectShape(); radPanel7.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel7.PanelElement.PanelFill.BackColor = Color.White; radPanel8.PanelElement.Shape = new RoundRectShape(); radPanel8.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel8.PanelElement.PanelFill.BackColor = Color.White; radPanel9.PanelElement.Shape = new RoundRectShape(); radPanel9.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel9.PanelElement.PanelFill.BackColor = Color.White; radPanel10.PanelElement.Shape = new RoundRectShape(); radPanel10.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel10.PanelElement.PanelFill.BackColor = Color.White; radPanel1.PanelElement.Shape = new RoundRectShape(); radPanel1.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel1.PanelElement.PanelFill.BackColor = Color.Violet; radPanel13.PanelElement.Shape = new RoundRectShape(); radPanel13.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel13.PanelElement.PanelFill.BackColor = Color.Blue; radPanel14.PanelElement.Shape = new RoundRectShape(); radPanel14.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel14.PanelElement.PanelFill.BackColor = Color.Gray; label1.Font = GlobalVariable.headerlistFONTsupecSmall; label4.Font = GlobalVariable.headerlistFONTsupecSmall; label5.Font = GlobalVariable.headerlistFONTsupecSmall; label6.Font = GlobalVariable.headerlistFONTsupecSmall; label7.Font = GlobalVariable.headerlistFONTsupecSmall; label8.Font = GlobalVariable.headerlistFONTsupecSmall; label9.Font = GlobalVariable.headerlistFONTsupecSmall; label10.Font = GlobalVariable.headerlistFONTsupecSmall; label11.Font = GlobalVariable.headerlistFONTsupecSmall; string shenasnameID = GlobalVariable.shenasnameID; if (shenasnameID != "") { using (Context dbcontext = new Context()) { Model.shenasname item = dbcontext.shenasnames.Where(x => x.ID == GlobalVariable.shenasnameID).FirstOrDefault(); commentSection.Text = item.comment; } } }
private void label18_Click(object sender, EventArgs e) { string id = GlobalVariable.shenasnameID; Model.shenasname item = dbcontext.shenasnames.FirstOrDefault(x => x.ID == id); if (item.final != 1) { try { item.DrasmiT = Int32.Parse(DrasmiT.Text); item.DrasmiHPR = Int32.Parse(DrasmiHPR.Text); item.DrasmiHPD = Int32.Parse(DrasmiHPD.Text); item.DgharartamamT = Int32.Parse(DgharartamamT.Text); item.DgharartamamHPR = Int32.Parse(DgharartamamHPR.Text); item.DgharartamamHPD = Int32.Parse(DgharartamamHPD.Text); item.DghararsaatT = Int32.Parse(DghararsaatT.Text); item.DghararsaatHPR = Int32.Parse(DghararsaatHPR.Text); item.DghararsaatHPD = Int32.Parse(DghararsaatHPD.Text); item.DvazifeT = Int32.Parse(DvazifeT.Text); item.DvazifeHPR = Int32.Parse(DvazifeHPR.Text); item.DvazifeHPD = Int32.Parse(DvazifeHPD.Text); item.ZDirasmiT = Int32.Parse(ZDirasmiT.Text); item.ZDirasmiHPR = Int32.Parse(ZDirasmiTHPR.Text != "" ? ZDirasmiTHPR.Text : "0"); item.ZDirasmiHPD = Int32.Parse(ZDirasmiHPD.Text); item.ZDigharartamamT = Int32.Parse(ZDigharartamamT.Text); item.ZDigharartamamHPR = Int32.Parse(ZDigharartamamHPR.Text); item.ZDigharartamamHPD = Int32.Parse(ZDigharartamamHPD.Text); item.ZDighararsaatT = Int32.Parse(ZDighararsaatT.Text); item.ZDighararsaatHPR = Int32.Parse(ZDighararsaatHPR.Text); item.ZDighararsaatHPD = Int32.Parse(ZDighararsaatHPD.Text); item.ZDivazifeT = Int32.Parse(ZDivazifeT.Text); item.ZDivazifeHPR = Int32.Parse(ZDivazifeHPR.Text); item.ZDivazifeHPD = Int32.Parse(ZDivazifeHPD.Text); item.LrasmiT = Int32.Parse(LrasmiT.Text); item.LrasmiHPR = Int32.Parse(LrasmiHPR.Text); item.LrasmiHPD = Int32.Parse(LrasmiHPD.Text); item.LgharartamamT = Int32.Parse(LgharartamamT.Text); item.LgharartamamHPR = Int32.Parse(LgharartamamHPR.Text); item.LgharartamamHPD = Int32.Parse(LgharartamamHPD.Text); item.LghararsaatT = Int32.Parse(LghararsaatT.Text); item.LghararsaatHPR = Int32.Parse(LghararsaatHPR.Text); item.LghararsaatHPD = Int32.Parse(LghararsaatHPD.Text); item.LvazifeT = Int32.Parse(LvazifeT.Text); item.LvazifeHPR = Int32.Parse(LvazifeHPR.Text); item.LvazifeHPD = Int32.Parse(LvazifeHPD.Text); item.DirasmiT = Int32.Parse(DirasmiT.Text); item.DirasmiHPR = Int32.Parse(DirasmiHPR.Text); item.DirasmiHPD = Int32.Parse(DirasmiHPD.Text); item.DigharartamamT = Int32.Parse(DigharartamamT.Text); item.DigharartamamHPR = Int32.Parse(DigharartamamHPR.Text); item.DigharartamamHPD = Int32.Parse(DigharartamamHPD.Text); item.DighararsaatT = Int32.Parse(DighararsaatT.Text); item.DighararsaatHPR = Int32.Parse(DighararsaatHPR.Text); item.DighararsaatHPD = Int32.Parse(DighararsaatHPD.Text); item.DivazifeT = Int32.Parse(DivazifeT.Text); item.DivazifeHPR = Int32.Parse(DivazifeHPR.Text); item.DivazifeHPD = Int32.Parse(DivazifeHPD.Text); item.FLrasmiT = Int32.Parse(FLrasmiT.Text); item.FLrasmiHPR = Int32.Parse(FLrasmiHPR.Text); item.FLrasmiHPD = Int32.Parse(FLrasmiHPD.Text); item.FLgharartamamT = Int32.Parse(FLgharartamamT.Text); item.FLgharartamamHPR = Int32.Parse(FLgharartamamHPR.Text); item.FLgharartamamHPD = Int32.Parse(FLgharartamamHPD.Text); item.FLghararsaatT = Int32.Parse(FLghararsaatT.Text); item.FLghararsaatHPR = Int32.Parse(FLghararsaatHPR.Text); item.FLghararsaatHPD = Int32.Parse(FLghararsaatHPD.Text); item.FLvazifeT = Int32.Parse(FLvazifeT.Text); item.FLvazifeHPR = Int32.Parse(FLvazifeHPR.Text); item.FLvazifeHPD = Int32.Parse(FLvazifeHPD.Text); dbcontext.SaveChanges(); this.Hide(); } catch { } } Form9_money_sarmaye form9 = new Form9_money_sarmaye(); form9.Show(); this.Hide(); }
public Form8_Money_Personal() { InitializeComponent(); FontClass fontclass = new FontClass(); List <Control> allControls = fontclass.GetAllControls(this); List <Control> alltextBox = fontclass.GetAllTextBox(this); allControls.ForEach(k => k.Font = mostaan.GlobalVariable.headerlistFONTsupecSmall); alltextBox.ForEach(k => k.Font = mostaan.GlobalVariable.headerlistFONTsmall); alltextBox.ForEach(x => x.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox20_KeyDown)); header.Font = mostaan.GlobalVariable.headerlistFONT; this.MaximizeBox = false; this.CenterToScreen(); //panel1.PanelElement.Shape = new RoundRectShape(); //panel1.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; //panel1.PanelElement.PanelFill.BackColor = Color.White; header.Font = GlobalVariable.headerlistFONTBold; label2.Font = GlobalVariable.headerlistFONTsmall; label77.Font = GlobalVariable.headerlistFONTsmall; label3.Font = GlobalVariable.headerlistFONTsmall; label18.Font = GlobalVariable.headerlistFONTsmall; label17.Font = GlobalVariable.headerlistFONTsmall; label12.Font = GlobalVariable.headerlistFONTsmall; panel2.PanelElement.Shape = new RoundRectShape(); panel2.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; panel2.PanelElement.PanelFill.BackColor = Color.White; panel3.PanelElement.Shape = new RoundRectShape(); panel3.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; panel3.PanelElement.PanelFill.BackColor = Color.Violet; radPanel1.PanelElement.Shape = new RoundRectShape(); radPanel1.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel1.PanelElement.PanelFill.BackColor = Color.White; radPanel2.PanelElement.Shape = new RoundRectShape(); radPanel2.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel2.PanelElement.PanelFill.BackColor = Color.White; radPanel3.PanelElement.Shape = new RoundRectShape(); radPanel3.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel3.PanelElement.PanelFill.BackColor = Color.Violet; radPanel4.PanelElement.Shape = new RoundRectShape(); radPanel4.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel4.PanelElement.PanelFill.BackColor = Color.White; radPanel5.PanelElement.Shape = new RoundRectShape(); radPanel5.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel5.PanelElement.PanelFill.BackColor = Color.White; radPanel6.PanelElement.Shape = new RoundRectShape(); radPanel6.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel6.PanelElement.PanelFill.BackColor = Color.White; radPanel7.PanelElement.Shape = new RoundRectShape(); radPanel7.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel7.PanelElement.PanelFill.BackColor = Color.White; radPanel8.PanelElement.Shape = new RoundRectShape(); radPanel8.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel8.PanelElement.PanelFill.BackColor = Color.White; radPanel9.PanelElement.Shape = new RoundRectShape(); radPanel9.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel9.PanelElement.PanelFill.BackColor = Color.White; radPanel10.PanelElement.Shape = new RoundRectShape(); radPanel10.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel10.PanelElement.PanelFill.BackColor = Color.White; radPanel1.PanelElement.Shape = new RoundRectShape(); radPanel1.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel1.PanelElement.PanelFill.BackColor = Color.White; radPanel13.PanelElement.Shape = new RoundRectShape(); radPanel13.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel13.PanelElement.PanelFill.BackColor = Color.Blue; radPanel14.PanelElement.Shape = new RoundRectShape(); radPanel14.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; radPanel14.PanelElement.PanelFill.BackColor = Color.Gray; label1.Font = GlobalVariable.headerlistFONTsupecSmall; label4.Font = GlobalVariable.headerlistFONTsupecSmall; label5.Font = GlobalVariable.headerlistFONTsupecSmall; label6.Font = GlobalVariable.headerlistFONTsupecSmall; label7.Font = GlobalVariable.headerlistFONTsupecSmall; label8.Font = GlobalVariable.headerlistFONTsupecSmall; label9.Font = GlobalVariable.headerlistFONTsupecSmall; label10.Font = GlobalVariable.headerlistFONTsupecSmall; label11.Font = GlobalVariable.headerlistFONTsupecSmall; if (GlobalVariable.shenasnameID != "") { Model.shenasname item = dbcontext.shenasnames.FirstOrDefault(x => x.ID == GlobalVariable.shenasnameID); DrasmiT.Text = item.DrasmiT.ToString(); DrasmiHPR.Text = item.DrasmiHPR.ToString(); DrasmiHPD.Text = item.DrasmiHPD.ToString(); DgharartamamT.Text = item.DgharartamamT.ToString(); DgharartamamHPR.Text = item.DgharartamamHPR.ToString(); DgharartamamHPD.Text = item.DgharartamamHPD.ToString(); DghararsaatT.Text = item.DghararsaatT.ToString(); DghararsaatHPR.Text = item.DghararsaatHPR.ToString(); DghararsaatHPD.Text = item.DghararsaatHPD.ToString(); DvazifeT.Text = item.DvazifeT.ToString(); DvazifeHPR.Text = item.DvazifeHPR.ToString(); DvazifeHPD.Text = item.DvazifeHPD.ToString(); ZDirasmiT.Text = item.ZDirasmiT.ToString(); ZDirasmiHPR.Text = item.ZDirasmiHPR.ToString(); ZDirasmiHPD.Text = item.ZDirasmiHPD.ToString(); ZDigharartamamT.Text = item.ZDigharartamamT.ToString(); ZDigharartamamHPR.Text = item.ZDigharartamamHPR.ToString(); ZDigharartamamHPD.Text = item.ZDigharartamamHPD.ToString(); ZDighararsaatT.Text = item.ZDighararsaatT.ToString(); ZDighararsaatHPR.Text = item.ZDighararsaatHPR.ToString(); ZDighararsaatHPD.Text = item.ZDighararsaatHPD.ToString(); ZDivazifeT.Text = item.ZDivazifeT.ToString(); ZDivazifeHPR.Text = item.ZDivazifeHPR.ToString(); ZDivazifeHPD.Text = item.ZDivazifeHPD.ToString(); LrasmiT.Text = item.LrasmiT.ToString(); LrasmiHPR.Text = item.LrasmiHPR.ToString(); LrasmiHPD.Text = item.LrasmiHPD.ToString(); LgharartamamT.Text = item.LgharartamamT.ToString(); LgharartamamHPR.Text = item.LgharartamamHPR.ToString(); LgharartamamHPD.Text = item.LgharartamamHPD.ToString(); LghararsaatT.Text = item.LghararsaatT.ToString(); LghararsaatHPR.Text = item.LghararsaatHPR.ToString(); LghararsaatHPD.Text = item.LghararsaatHPD.ToString(); LvazifeT.Text = item.LvazifeT.ToString(); LvazifeHPR.Text = item.LvazifeHPR.ToString(); LvazifeHPD.Text = item.LvazifeHPD.ToString(); DirasmiT.Text = item.DirasmiT.ToString(); DirasmiHPR.Text = item.DirasmiHPR.ToString(); DirasmiHPD.Text = item.DirasmiHPD.ToString(); DigharartamamT.Text = item.DigharartamamT.ToString(); DigharartamamHPR.Text = item.DigharartamamHPR.ToString(); DigharartamamHPD.Text = item.DigharartamamHPD.ToString(); DighararsaatT.Text = item.DighararsaatT.ToString(); DighararsaatHPR.Text = item.DighararsaatHPR.ToString(); DighararsaatHPD.Text = item.DighararsaatHPD.ToString(); DivazifeT.Text = item.DivazifeT.ToString(); DivazifeHPR.Text = item.DivazifeHPR.ToString(); DivazifeHPD.Text = item.DivazifeHPD.ToString(); FLrasmiT.Text = item.FLrasmiT.ToString(); FLrasmiHPR.Text = item.FLrasmiHPR.ToString(); FLrasmiHPD.Text = item.FLrasmiHPD.ToString(); FLgharartamamT.Text = item.FLgharartamamT.ToString(); FLgharartamamHPR.Text = item.FLgharartamamHPR.ToString(); FLgharartamamHPD.Text = item.FLgharartamamHPD.ToString(); FLghararsaatT.Text = item.FLghararsaatT.ToString(); FLghararsaatHPR.Text = item.FLghararsaatHPR.ToString(); FLghararsaatHPD.Text = item.FLghararsaatHPD.ToString(); FLvazifeT.Text = item.FLvazifeT.ToString(); FLvazifeHPR.Text = item.FLvazifeHPR.ToString(); FLvazifeHPD.Text = item.FLvazifeHPD.ToString(); } }