public frmCalls(String CustomerID)
        {
            InitializeComponent();
            oCustomer = new CustomerCall(base.CompanyID);

            oCustomer.Find(CustomerID);
            this.txtCustomerID.Text  = oCustomer.ID;
            this.txtName.Text        = oCustomer.Name;
            this.txtPickUpDate.Value = oCustomer.PickUpDate;
            this.txtEndDate.Value    = oCustomer.EndDate;

            this.txtChairperson.Text = oCustomer.Chairperson;
            this.txtPhone_1.Text     = oCustomer.PhoneNumber;
            this.txtPhone_2.Text     = oCustomer.HeadPhone;

            this.txtCustomerID.Enabled = false;
            this.txtName.Enabled       = false;
            this.txtPickUpDate.Enabled = false;
            this.txtEndDate.Enabled    = false;

            oCustomer.FindCall(CustomerID);

            m_hb.Title     = "Call Instruction";
            m_hb.TitleIcon = TooltipIcon.Info;
            //m_hb.SetToolTip(cbEnd1, "Write each student’s total money collected on the order form in the box marked “School Use Only” (see example #3 on pg. 7). You do not need to check the order; however we cannot verify the order for you if you do not enter an amount in this box.");
        }
예제 #2
0
        void menuItem1_Click(object sender, EventArgs e)
        {
            //throw new Exception("The method or operation is not implemented.");
            frmCallsAssignUser oFrm = new frmCallsAssignUser();

            User      oUser = new User();
            DataTable dt    = oUser.GetActiveUsers();

            foreach (DataRow row in dt.Rows)
            {
                oFrm.cbUsers.Items.Add(row["User"].ToString());
            }
            oFrm.ShowDialog();

            if (oFrm.PressedButton == "Apply" && oFrm.UserSelected.Trim() != "")
            {
                CustomerCall oCall = new CustomerCall(this.CompanyID);
                foreach (Row row in this.table.TableModel.Selections.SelectedItems)
                {
                    //MessageBox.Show(row.Cells[0].Text);

                    if (oCall.Find(row.Cells[0].Text))
                    {
                        oCall.FindCall(row.Cells[0].Text);
                        oCall.UserID = oFrm.UserSelected;
                        oCall.Save();
                    }
                }
                frmCallsAssignment_Load(null, null);
            }
        }
예제 #3
0
        void genreEditor_EndEdit(object sender, XPTable.Events.CellEditEventArgs e)
        {
            CustomerCall oCall = new CustomerCall(this.CompanyID);
            Row          row   = this.table.TableModel.Rows[e.Row];

            if (oCall.Find(row.Cells[0].Text))
            {
                oCall.FindCall(row.Cells[0].Text);
                oCall.UserID = ((ComboBoxCellEditor)e.Editor).SelectedItem.ToString();
                oCall.Save();
                //MessageBox.Show(row.Cells[4].Text);
            }
            //throw new Exception("The method or operation is not implemented.");
        }
예제 #4
0
        private void SaveCalls()
        {
            CustomerCall oCall = new CustomerCall(this.CompanyID);

            foreach (Row row in this.table.TableModel.Rows)
            {
                if (oCall.Find(row.Cells[0].Text))
                {
                    oCall.FindCall(row.Cells[0].Text);
                    oCall.UserID = row.Cells[4].Text;
                    oCall.Save();
                    //MessageBox.Show(row.Cells[4].Text);
                }
            }
        }
예제 #5
0
 private void table_KeyUp(object sender, KeyEventArgs e)
 {
     if (sender == table)
     {
         if (e.KeyCode == Keys.Delete)
         {
             CustomerCall oCall = new CustomerCall(this.CompanyID);
             Row          row   = this.table.TableModel.Selections.SelectedItems[0];
             if (oCall.Find(row.Cells[0].Text))
             {
                 oCall.FindCall(row.Cells[0].Text);
                 oCall.UserID = "";
                 oCall.Delete();
                 row.Cells[4].Text = "";
                 //MessageBox.Show(row.Cells[4].Text);
             }
         }
     }
 }
        private void LoadCalls()
        {
            CustomerCall oCustCall = new CustomerCall(oCustomer.CompanyID);

            this.table.TableModel = new TableModel();
            //XPListViewItem itm;

            foreach (DataRow row in dt.Rows)
            {
                oCustomer.Find(row["CustomerID"].ToString());
                oCustCall.FindCall(oCustomer.ID);
                this.table.TableModel.Rows.Add(new Row(new Cell[] { new Cell(row["CustomerID"].ToString()),
                                                                    new Cell(oCustomer.Name),
                                                                    new Cell(oMySql.SqlDate(oCustomer.EndDate)),
                                                                    new Cell(oMySql.SqlDate(oCustomer.PickUpDate)),
                                                                    new Cell(oCustCall.UserID),
                                                                    new Cell(false), })
                                               );
            }
            //this.table.TableModel.RowHeight += 3;
        }