Esempio n. 1
0
        private void frmAuditLogReport_Load(object sender, EventArgs e)
        {
            using (SPEntities db = new SPEntities())
            {
                userBindingSource.DataSource = db.Users.ToList();
            }

            List <User> userList = db.Users.ToList();
        }
Esempio n. 2
0
 private void UCAddClient_Load(object sender, EventArgs e)
 {
     using (SPEntities db = new SPEntities())
     {
         provinceBindingSource.DataSource            = db.Provinces.ToList();
         cityBindingSource.DataSource                = db.Cities.ToList();
         clientAccountStatusBindingSource.DataSource = db.Client_Account_Status.ToList();
         creditStatusBindingSource.DataSource        = db.Credit_Status.ToList();
     }
 }
Esempio n. 3
0
        private void frmReport_Load(object sender, EventArgs e)
        {
            using (SPEntities db = new SPEntities())
            {
                userBindingSource.DataSource = db.Users.ToList();
            }

            List <User> userList = db.Users.ToList();
            //this.reportViewer1.RefreshReport();
        }
Esempio n. 4
0
        private void frmPublish_Load(object sender, EventArgs e)
        {
            dataGridView1.ReadOnly      = false;
            dataGridView1.MultiSelect   = true;
            dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;

            dataGridView2.ReadOnly      = false;
            dataGridView2.MultiSelect   = true;
            dataGridView2.SelectionMode = DataGridViewSelectionMode.FullRowSelect;


            //var r = db.Clients.ToList();
            //dataGridView1.DataSource = r.Select(col => new { col.Client_ID, col.Client_Name, col.Client_Email_Address }).ToList();
            using (SPEntities db = new SPEntities())
            {
                clientBindingSource1.DataSource = db.Clients.ToList();
            }



            txtFrom.Text = db.Company_Information.Select(co => co.Company_Name).FirstOrDefault();

            var comp = db.Company_Information.FirstOrDefault();

            var quary = db.Email_Notice_Template.Where(co => co.Template_Id == val).FirstOrDefault();


            txtSubjectLine.Text = quary.Template_Description;

            listBox1.Items.Add("");
            listBox1.Items.Add(Environment.NewLine);
            listBox1.Items.Add(Environment.NewLine);
            listBox1.Items.Add(quary.Template_Text);
            listBox1.Items.Add(Environment.NewLine);
            listBox1.Items.Add(Environment.NewLine);

            listBox2.Items.Add("Kind Regards");
            listBox2.Items.Add(Environment.NewLine);
            listBox2.Items.Add(Environment.NewLine);
            listBox2.Items.Add("Lopac Tissues");
            listBox2.Items.Add(Environment.NewLine);
            listBox2.Items.Add("Contact Number: " + comp.Telephone_Number);
            listBox2.Items.Add("Email: " + comp.Email_Address);
        }
Esempio n. 5
0
        private void frmMaintainClients_Load(object sender, EventArgs e)
        {
            using (SPEntities db = new SPEntities())
            {
                provinceBindingSource.DataSource            = db.Provinces.ToList();
                cityBindingSource.DataSource                = db.Cities.ToList();
                clientAccountStatusBindingSource.DataSource = db.Client_Account_Status.ToList();
                creditStatusBindingSource.DataSource        = db.Credit_Status.ToList();
            }

            try
            {
                var query  = db.Clients.Where(co => co.Client_ID == tempID).FirstOrDefault();
                var query1 = db.Provinces.Where(co => co.Province_Id == tempID).FirstOrDefault();
                var query2 = db.Cities.Where(co => co.City_Id == tempID).FirstOrDefault();
                var query3 = db.Credit_Approval.Where(co => co.Credit_Approval_ID == tempID).FirstOrDefault();
                var query4 = db.Credit_Status.Where(co => co.Credit_Status_ID == tempID).FirstOrDefault();


                txtName.Text        = query.Client_Name;
                txtVatRegNum.Text   = query.Client_VAT_Reg_Number;
                txtTelephone.Text   = query.Client_Telephone;
                txtFaxNumber.Text   = query.Client_Fax_Number;
                txtEmailAdd.Text    = query.Client_Email_Address;
                txtPhysicalAdd.Text = query.Physical_Address;

                txtProvince.Text = query1.Province_Name;
                txtCity.Text     = query2.City_Name;

                txtAmount.Text     = Convert.ToString(query3.Credit_Approval_Amount);
                txtCreditSta.Text  = query4.Credit_Status_Description;
                txtApprovedBy.Text = query3.Authourised_By;
                txtDateTimeDateOfCommencement.MinDate = Convert.ToDateTime(NewCA.Date_Of_Commencement);
                txtCreditSta.Text = Convert.ToString(query.Client_Account_Status);
                txtFilePath.Text  = Convert.ToString(query3.Credit_Approval_Form);
            }
            catch (Exception)
            {
                MessageBox.Show("Whoops, An Error Occured");
            }
        }