Esempio n. 1
0
 public static SalesLeadDA getInstance()
 {
     if (instance == null)
     {
         instance = new SalesLeadDA();
     }
     return(instance);
 }
Esempio n. 2
0
        public void viewSalesleadData(int salesID)
        {
            modelSaleslead = SalesLeadDA.getInstance().readFromDatabase(salesID);

            if (modelSaleslead != null)
            {
                viewSaleslead.TextCustomerID.Text        = Convert.ToString(modelSaleslead.Customer.CustomerID);
                viewSaleslead.TextProductID.Text         = Convert.ToString(modelSaleslead.Product.ProductID);
                viewSaleslead.ComboRevType.Text          = modelSaleslead.RevenueType;
                viewSaleslead.TextMonthlyRev.Text        = Convert.ToString(modelSaleslead.MonthlyRevenue);
                viewSaleslead.ComboHadTest.SelectedIndex = Convert.ToInt32(modelSaleslead.HadTest);
                viewSaleslead.TextProjectRev.Text        = Convert.ToString(modelSaleslead.ProjectRevenue);
                viewSaleslead.TextProjectPaid.Text       = Convert.ToString(modelSaleslead.ProjectPaid);
                ;
                viewSaleslead.ComboFirstBill.SelectedIndex = modelSaleslead.getSalesActivity(ActivityType.BillIssue).ActivityDetails.ToUpper().Equals("YES") ? 1:0;
                viewSaleslead.TextCloseReason.Text         = modelSaleslead.getSalesActivity(ActivityType.SalesClose).ActivityDetails;
                viewSaleslead.TextDisconReason.Text        = modelSaleslead.getSalesActivity(ActivityType.Disconect).ActivityDetails;
                viewSaleslead.TextCustomerFeedback.Text    = modelSaleslead.CustomerFeedBack;
                viewSaleslead.TextDiscount.Text            = Convert.ToString(modelSaleslead.Discount);
                viewSaleslead.TextNotes.Text = modelSaleslead.Notes;


                Rules.nullDateTimePick(viewSaleslead.DateIssue, modelSaleslead.getSalesActivity(ActivityType.SalesIssue).ActivityDate);
                Rules.nullDateTimePick(viewSaleslead.DateCustomerConfirm, modelSaleslead.getSalesActivity(ActivityType.CustomerConfirm).ActivityDate);
                Rules.nullDateTimePick(viewSaleslead.DateAgreementSign, modelSaleslead.getSalesActivity(ActivityType.AgreementSign).ActivityDate);
                Rules.nullDateTimePick(viewSaleslead.DSP, modelSaleslead.getSalesActivity(ActivityType.DSP).ActivityDate);
                Rules.nullDateTimePick(viewSaleslead.DateBillIssue, modelSaleslead.getSalesActivity(ActivityType.BillIssue).ActivityDate);
                Rules.nullDateTimePick(viewSaleslead.DateClosed, modelSaleslead.getSalesActivity(ActivityType.SalesClose).ActivityDate);
                Rules.nullDateTimePick(viewSaleslead.DateDiscon, modelSaleslead.getSalesActivity(ActivityType.Disconect).ActivityDate);
            }
            else
            {
                //MessageBox.Show("No Sales with ID " + this.selectedSalesID);
                //this.Close();
            }
        }
Esempio n. 3
0
 /// <summary>
 /// has to return all salesLeadsID of a specific Product
 /// </summary>
 /// <param name="ProductID"></param>
 /// <returns></returns>
 public int[] returnSalesLeadsIDArrayForProducts(int ProductID)
 {
     return(SalesLeadDA.getInstance().returnSalesLeadsIDArrayForProducts(ProductID));
 }
Esempio n. 4
0
 /// <summary>
 /// return all salesLeadsID's of a specific customer
 /// </summary>
 /// <param name="SalesLeadsID"></param>
 /// <returns></returns>
 public int[] returnSalesLeadsArrayForCustomer(int CustomerID)
 {
     return(SalesLeadDA.getInstance().returnSalesLeadsArrayForCustomer(CustomerID));
 }
Esempio n. 5
0
 public string[] quotationIDToArray(int salesLeadsID)
 {
     return(SalesLeadDA.getInstance().quotationIDToArray(salesLeadsID));
 }
Esempio n. 6
0
 public bool update()
 {
     return(SalesLeadDA.getInstance().updateToDatabase(this));
 }
Esempio n. 7
0
 public bool create()
 {
     return(SalesLeadDA.getInstance().addToDatabase(this));
 }
Esempio n. 8
0
 public static System.Data.DataView getAllSales()
 {
     return(SalesLeadDA.getInstance().readAllSales());
 }