Ejemplo n.º 1
0
        public static void totalDecorationCost(string stage1, string homelight1, string homelightDuration1, string streetlight1, string streetlightDuration1, string gate1, string planaquin1)
        {
            DecorationService DS = new DecorationService();

            CostStage       = DS.SearchDecorationCost("Stage", stage1);
            CostHomeLight   = (Convert.ToDouble(homelightDuration1)) * (DS.SearchDecorationCost("HomeLight", homelight1));
            CostStreetLight = (Convert.ToDouble(streetlightDuration1)) * (DS.SearchDecorationCost("StreetLight", streetlight1));
            CostGate        = DS.SearchDecorationCost("Gate", gate1);
            CostPlanaquin   = DS.SearchDecorationCost("Palanquin", planaquin1);
            decorationCost  = CostGate + CostHomeLight + CostPlanaquin + CostStage + CostStreetLight;
        }
Ejemplo n.º 2
0
        private void decorationAddButton_Click(object sender, RoutedEventArgs e)
        {
            string item = Convert.ToString(itemTextBox.Text);
            string type = Convert.ToString(typeTextBox.Text);
            string cost = Convert.ToString(costTextBox.Text);

            Decoration.DecorationList    Dl = new Decoration.DecorationList(item, type, cost);
            Decoration.DecorationService S1 = new DecorationService();
            int i = S1.AddDecorationItem(Dl);

            if (i == 1)
            {
                Close();
            }
        }
Ejemplo n.º 3
0
        private void continueButton_Click(object sender, RoutedEventArgs e)
        {
            TotalCost = 0;
            EventCalculation.eventStartTime = Convert.ToString(startTimeTextBox.Text);
            EventCalculation.eventEndTime   = Convert.ToString(EndTimeTextBox.Text);
            EventCalculation.printedPhotos  = Convert.ToString(PrintedPhotoTextBox.Text);
            EventCalculation.eachPhotoCost  = Convert.ToString(eachPhotoCostTextBox.Text);
            int duration = EventCalculation.Duration(Convert.ToDouble(startTimeTextBox.Text), Convert.ToDouble(EndTimeTextBox.Text));
            {
                SqlConnection connection = new SqlConnection("Server=Tanmoy-PC; Database=Wedding Management; User Id=sa; Password=1238628257");
                connection.Open();
                SqlCommand     cmd        = new SqlCommand("SELECT Id, Name,Email,ContactNumber,Salary FROM AddedPhotographer", connection);
                SqlDataReader  reader     = cmd.ExecuteReader();
                List <Members> SearchList = new List <Members>();
                if (reader.HasRows)
                {
                    while (reader.Read())
                    {
                        SearchList.Add(new Members(reader.GetString(0), reader.GetString(1), reader.GetString(2), reader.GetString(3), reader.GetString(4)));
                        TotalCost = TotalCost + (Convert.ToDouble(reader.GetString(4)) * duration);
                    }
                    tempphotographyCost = TotalCost + (Convert.ToDouble(PrintedPhotoTextBox.Text) * Convert.ToDouble(eachPhotoCostTextBox.Text));
                }
                connection.Close();
                EventCalculation.photographyCost = tempphotographyCost;
                MemberServices clr = new MemberServices();
                int            j   = clr.ClearTable();

                Hide();
                EventDecoration   decor = new EventDecoration();
                DecorationService DS    = new DecorationService();

                connection.Open();
                decor.Show();
            }
        }