public SendSMSfrm(IEnumerable<IMobile> mobiles = null) { InitializeComponent(); _mobiles = mobiles; _uniDb = new UniDBDataContext(); }
public SendEmailfrm(IEnumerable<IEmail> emailIds) { InitializeComponent(); _emailIds = emailIds; _uniDb = new UniDBDataContext(); }
public CandidateReport() { InitializeComponent(); pagination = new GridPagination<CandidateDetail>(); //pagination.ReportFor = "Candidate"; uniDb = new UniDBDataContext(); }
public CandidateReport() { InitializeComponent(); columnPropertyInfos = typeof(CandidateDetail).GetProperties(); pagination = new GridPagination<CandidateDetail>(); //pagination.ReportFor = "Candidate"; uniDb = new UniDBDataContext(); }
public CompanyDetailsfrm(UniEnums.CompanyType companyType) { InitializeComponent(); _reportForm = new ReportForm<VendorDetail>(bindingNavigator1, dataGridView1, bindingNavigatorPositionItem.TextBox, lblReportStatus); _pagination = new GridPagination<CustomerDetail>(); _uniDb = new UniDBDataContext(); _companyType = companyType; }
private void txtPassword_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode != Keys.Enter) return; if (string.IsNullOrEmpty(txtExecutiveName.Text)) { MessageBox.Show("Please Enter Executive Name", "Message", MessageBoxButtons.OK); return; } if (UserDetail.Id <= 0) { var uniDb = new UniDBDataContext(); UserDetail = uniDb.UserDetails.SingleOrDefault(x => x.UserId == txtExecutiveName.Text); } if (UserDetail == null) { MessageBox.Show("You have enter wrong User Name", "Message", MessageBoxButtons.OK); return; } if (UserDetail.Password.ToUpper() == txtPassword.Text.ToUpper()) { IsLogedIn = true; this.Close(); } else { MessageBox.Show("You have enter wrong password ", "Message", MessageBoxButtons.OK); } //if (txtPassword.Text.ToUpper() == ConfigurationSettings.AppSettings["password"].ToUpper()) //{ // ExecutiveName = txtExecutiveName.Text; // IsLogedIn = true; // this.Close(); //} //else //{ // MessageBox.Show("You have enter wrong password ", "Message", MessageBoxButtons.OK); //} }
private void toolStripComboBox1_SelectedIndexChanged(object sender, EventArgs e) { // ask for password var frmLogin = new Loginfrm(HomePage.UserDetail); frmLogin.ShowDialog(); if (!frmLogin.IsLogedIn) return; var selectedSrNos = _reportForm.GetSelectedSrNo(); var uniDb = new UniDBDataContext(); var selectedCustomers = uniDb.CustomerDetails.Where(x => selectedSrNos.Contains(x.SrNo)); //uniDb.CustomerDetails.DeleteAllOnSubmit(selectedCustomers); if (toolStripComboBox1.Text != UniEnums.CompanyType.Customer.ToString()) { var query = uniDb.VendorDetails.Where(x => x.VendorType == toolStripComboBox1.Text); var srNo = query.Any() ? query.Max(c => c.SrNo) : 0; var newVendors = new List<VendorDetail>(); foreach (var customer in selectedCustomers) { srNo++; newVendors.Add(new VendorDetail() { SrNo = srNo, AnnualTurnover = customer.AnnualTurnover, BusinessType = customer.BusinessType, CompanyName = customer.CompanyName, ContactPerson = customer.ContactPerson, Email = customer.Email, EstablishedYear = customer.EstablishedYear, ExecutiveName = customer.ExecutiveName, Expert = customer.Expert, FactoryAddress = customer.FactoryAddress, IsDeleted = customer.IsDeleted, MobileNo = customer.MobileNo, Networking = customer.Networking, NoOfEmployees = customer.NoOfEmployees, Note = customer.Note, OfficeAddress = customer.OfficeAddress, PhoneNo = customer.PhoneNo, ProcessedDate = customer.ProcessedDate, Profile1 = customer.Profile1, Profile2 = customer.Profile2, Sector = customer.Sector, Source = customer.Source, Website = customer.Website, VendorType = toolStripComboBox1.Text, }); uniDb.VendorDetails.InsertAllOnSubmit(newVendors); } } else { var srNo = uniDb.CustomerDetails.Any(c => c.CompanyType == UniEnums.CompanyType.Customer.ToString()) ? uniDb.CustomerDetails.Where(c => c.CompanyType == UniEnums.CompanyType.Customer.ToString()) .Max(c => c.SrNo) : 0; var newCustomers = new List<CustomerDetail>(); foreach (var customer in selectedCustomers) { srNo++; newCustomers.Add(new CustomerDetail() { SrNo = srNo, CompanyType = UniEnums.CompanyType.Customer.ToString(), AnnualTurnover = customer.AnnualTurnover, BusinessType = customer.BusinessType, CompanyName = customer.CompanyName, ContactPerson = customer.ContactPerson, Email = customer.Email, EstablishedYear = customer.EstablishedYear, ExecutiveName = customer.ExecutiveName, Expert = customer.Expert, FactoryAddress = customer.FactoryAddress, IsDeleted = customer.IsDeleted, MobileNo = customer.MobileNo, Networking = customer.Networking, NoOfEmployees = customer.NoOfEmployees, Note = customer.Note, OfficeAddress = customer.OfficeAddress, PhoneNo = customer.PhoneNo, ProcessedDate = customer.ProcessedDate, Profile1 = customer.Profile1, Profile2 = customer.Profile2, Sector = customer.Sector, Source = customer.Source, Website = customer.Website }); } uniDb.CustomerDetails.InsertAllOnSubmit(newCustomers); } uniDb.SubmitChanges(); RefreshGrid(); }
public CandidateRecycle() { InitializeComponent(); uniDb = new UniDBDataContext(); }
private void HomePage_FormClosed(object sender, FormClosedEventArgs e) { var uniDb = new UniDBDataContext(); uniDb.CreateBackUp(); }