コード例 #1
0
ファイル: ServiceWindow.cs プロジェクト: slav-yrich/Beauty
        public ServiceWindow(Service service)
        {
            InitializeComponent();

            dtpServiceDate.Value = service.dateAndTime;
            dtpServiceDate.Enabled = false;
            dtpServiceTime.Value = service.dateAndTime;
            dtpServiceTime.Enabled = false;

            tbMaster.Text = service.master;

            tbServiceName.Text = service.name;
            tbServiceShortName.Text = service.shortName;
            tbPrice.Text = service.price.ToString();
            tbTotalPrice.Text = service.GetTotalPrice().ToString();

            cbFactor.Items.Clear();
            for (int i = 1; i <= 1000; i++)
            {
                cbFactor.Items.Add(i.ToString());
            }
            cbDiscount.Items.Clear();
            for (int i = 0; i <= 100; i++)
            {
                cbDiscount.Items.Add(i.ToString());
            }
            cbFactor.SelectedIndex = service.factor-1;
            cbDiscount.SelectedIndex = service.discount;

            tbMaster.ReadOnly = true;
            tbServiceShortName.ReadOnly = true;
            tbServiceName.ReadOnly = true;
            tbPrice.ReadOnly = true;
            tbTotalPrice.ReadOnly = true;
            cbDiscount.Enabled = false;
            cbFactor.Enabled = false;
            cbConstService.Enabled = false;

            buttonDeleteLine.Visible = true;
            buttonCancel.Visible = false;
            buttonEditLine.Visible = true;
            buttonSaveLine.Visible = false;
            buttonAddLine.Visible = false;
        }
コード例 #2
0
ファイル: OneString.cs プロジェクト: slav-yrich/Beauty
 //При добавлении услуги описанной в файле услуг
 public void addService(Service service)
 {
     serviceList.Add(service);
 }