Esempio n. 1
0
        //
        //ページの初期化(新規追加)
        //
        public override void PageRefresh()
        {
            customer   = new DB.m_customer();
            member     = new DB.m_member();
            familyList = new List <DB.m_family>();

            //Comboboxの設定
            co_Sex.DataSource              = Enum.GetValues(typeof(Utile.Data.性別));
            co_Visit_motive.DataSource     = Enum.GetValues(typeof(Utile.Data.来店動機));
            co_Registered_store.DataSource = DB.m_store.getStoreNameList();
            co_Rank.DataSource             = Enum.GetValues(typeof(Utile.Data.ランク));
            co_Membership_type.DataSource  = Enum.GetValues(typeof(Utile.Data.会員種別));

            //データを設定
            t_Pref_city_town_village_name.Text = "";
            t_Address2.Text          = "";
            t_Apartment_mansion.Text = "";
            da_Birthday.Value        = DateTime.Now.Date;
            t_Customer_code.Text     = "";
            ch_DM_Available.Checked  = false;
            t_Fax.Text                            = "";
            t_Free_item1.Text                     = "";
            t_Free_item2.Text                     = "";
            t_Free_item3.Text                     = "";
            t_mail.Text                           = "";
            t_name.Text                           = "";
            t_name_kana.Text                      = "";
            t_Phone_number1.Text                  = "";
            t_Phone_number2.Text                  = "";
            t_Phone_number3.Text                  = "";
            t_Postal_code.Text                    = "";
            co_Visit_motive.SelectedIndex         = 0;
            t_Remark.Text                         = "";
            ch_Sample.Checked                     = false;
            co_Sex.SelectedIndex                  = 0;
            t_surname.Text                        = "";
            t_surname_kana.Text                   = "";
            da_Customer_wedding_anniversary.Value = DateTime.Now.Date;

            da_Registration_date.Value        = da_Registration_date.MinDate;
            co_Membership_type.SelectedIndex  = 0;
            co_Rank.SelectedIndex             = 0;
            t_Registration_officer.Text       = "";
            co_Registered_store.SelectedIndex = 0;

            dataGridView1.Rows.Clear();

            //変更チェックリセット
            mod.reset();

            //入力チェックリセット
            chk.clear();

            //一覧クリア
            dataGridView2.Rows.Clear();
            dataGridView4.Rows.Clear();
            listView1.Items.Clear();
        }
Esempio n. 2
0
        private void Set_intialDiaplay()
        {
            //storeCodeListの初期化
            storeCodeList.Clear();
            NpgsqlDataReader dataReader = null;
            var dbc = new DB.DBConnect();

            dbc.npg.Open();
            StringBuilder sb = new StringBuilder();

            sb.Append(@"select store_code, store_name ");
            sb.Append(@"from m_store ");
            sb.Append(@"where m_store.delete_flag = '0' order by m_store.store_code");
            var command = new NpgsqlCommand(sb.ToString(), dbc.npg);

            dataReader = command.ExecuteReader();

            while (dataReader.Read())
            {
                //storeCodeListの生成
                storeCodeList.Add(new storeCodeArray
                {
                    store_code = dataReader["store_code"].ToString(),
                    store_name = dataReader["store_name"].ToString()
                });
            }

            dbc.npg.Close();

            //店舗名の生成
            d_tenpo.Items.Clear();
            for (int i = 0; i < storeCodeList.Count; i++)
            {
                d_tenpo.Items.Add(storeCodeList[i].store_name);
            }

            if (costumeDBList.Count == 0)
            {
                ShowBlank();
            }
            else
            {
                Listshow();
            }


            //変更フラグクリア
            mod.reset();

            //エラー項目クリア
            chk.clear();
        }
Esempio n. 3
0
        public override void PageRefresh()
        {
            RefreshFlg                = true;
            d_tenpo.DataSource        = DB.m_store.getStoreNameList();
            d_staff.DataSource        = DB.m_staff.getStaffNameList(MainForm.session_m_staff.store_code);
            t_syugyoukubun.DataSource = Enum.GetValues(typeof(Utile.Data.就業区分));

            d_tenpo.SelectedIndex = d_tenpo.FindStringExact(DB.m_store.getSingle(MainForm.session_m_staff.store_code).store_name);
            d_staff.SelectedIndex = d_staff.FindStringExact(DB.m_staff.getSingle(MainForm.session_m_staff.staff_code).staff_name);

            monthCalendar1.SetDate(DateTime.Now.Date);

            //初期化
            SetDisp(GetStaff_Shift());

            mod.reset();
            RefreshFlg = false;
        }
Esempio n. 4
0
        //
        //ページの初期化
        //
        public override void PageRefresh()
        {
            //TextBox項目の初期化の初期化(受付コード・受付時間・概要)

            //
            //   顧客データ表示部分の初期化の初期化
            //
            var customer = DB.m_customer.getSingle(MainForm.session_t_reception.customer_code);

            //本番用コード(本番のみ利用)
            d_customer_code.Text        = customer.customer_code;
            d_customer_name.Text        = customer.surname + customer.name;
            d_birthday.Text             = customer.birthday.ToString("yyyy年MM月dd日");
            d_sex.Text                  = Enum.GetNames(typeof(Utile.Data.性別))[int.Parse(customer.sex)];
            d_customer_postal_code.Text = customer.postal_code;
            d_address1.Text             = customer.address1;
            d_address2.Text             = customer.address2;
            d_address3.Text             = customer.address3;
            d_phone_number.Text         = customer.phone_number1 + " " + customer.phone_number2 + " " + customer.phone_number3;

            //
            //   ComboBoxの初期化
            //
            d_Shooting_purpose.DataSource = Enum.GetValues(typeof(Utile.Data.撮影目的));
            d_sex2.DataSource             = Enum.GetValues(typeof(Utile.Data.性別));

            //
            //    グリッドビューに格納
            //
            d_renral_result.Rows.Clear();
            d_renral_result.RowTemplate.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
            d_renral_result.RowTemplate.Height = 80;
            foreach (var cr in costumeReservationList)
            {
                var store = DB.m_store.getSingle(cr.store_code);
                var cos   = DB.m_costume.getSingle(cr.store_code, cr.costume_code);

                var rental = cos.rental_store == "" ? "" : " > " + cos.rental_store;
                var store_name_and_rental = store.store_name + Environment.NewLine + rental;

                d_renral_result.Rows.Add(
                    true,
                    getImage(getImgPath(store.store_name, cr.costume_code, cos.image1)),
                    cr.costume_code,
                    store_name_and_rental,
                    cos.Class + Environment.NewLine +
                    cos.brand_name + Environment.NewLine +
                    cos.color + Environment.NewLine +
                    cos.handle + Environment.NewLine +
                    cos.size,
                    cos.price1.ToString() + Environment.NewLine +
                    cos.price2.ToString() + Environment.NewLine +
                    cos.price3.ToString(),
                    cos.costume_name,
                    cr.start_date.ToString(@"yyyy/MM/dd"),
                    cr.start_time.ToString(@"hh\:mm"),
                    cr.end_date.ToString(@"yyyy/MM/dd"),
                    cr.end_time.ToString(@"hh\:mm"),
                    cr.memo
                    );
            }

            //
            //    個別情報格納
            //
            if (costumeReservationList[0].costume_reservation_code != "")
            {
                var cr = costumeReservationList[0];
                t_name.Text      = cr.name;
                t_name_kana.Text = cr.name_kana;
                if (cr.sex != null)
                {
                    d_sex2.SelectedIndex = int.Parse(cr.sex);
                }
                else
                {
                    d_sex2.SelectedIndex = -1;
                }
                if (cr.birthday != null)
                {
                    dt_birthday.Value   = cr.birthday.Value;
                    dt_birthday.Checked = true;
                }
                else
                {
                    dt_birthday.Value   = dt_birthday.MinDate;
                    dt_birthday.Checked = false;
                }
                d_height.Text   = cr.height.ToString();
                d_foot.Text     = cr.foot.ToString();
                d_sleeve.Text   = cr.sleeve.ToString();
                d_facility.Text = cr.facility;
                d_Shooting_purpose.SelectedIndex = Enum.GetNames(typeof(Utile.Data.撮影目的)).ToList().IndexOf(cr.shooting_purpose);
                if (cr.cancellation_date != null)
                {
                    d_Cancellation_date.Value   = cr.cancellation_date.Value;
                    d_Cancellation_date.Checked = true;
                }
                else
                {
                    d_Cancellation_date.Value   = d_Cancellation_date.MinDate;
                    d_Cancellation_date.Checked = false;
                }
            }
            else
            {
                t_name.Text                      = "";
                t_name_kana.Text                 = "";
                d_sex2.SelectedIndex             = -1;
                dt_birthday.Value                = dt_birthday.MinDate;
                d_height.Text                    = "";
                d_foot.Text                      = "";
                d_sleeve.Text                    = "";
                d_facility.Text                  = "";
                d_Shooting_purpose.SelectedIndex = -1;
                d_Cancellation_date.Value        = d_Cancellation_date.MinDate;
            }

            //変更フラグリセット
            mod.reset();
        }
        public override void PageRefresh()
        {
            //顧客情報設定
            if (MainForm.session_t_reception != null)
            {
                DB.m_customer cus = DB.m_customer.getSingle(MainForm.session_t_reception.customer_code);
                l_customer_code.Text = cus.customer_code;
                l_customer_name.Text = $"{cus.surname} {cus.name}";
                l_birthday.Text      = cus.birthday.ToString("yyyy年MM月dd日");
                l_age.Text           = GetAge(cus.birthday, DateTime.Now).ToString();
                l_sex.Text           = ((Utile.Data.性別)(int.Parse(cus.sex))).ToString();
                l_postal_code.Text   = cus.postal_code;
                l_address1.Text      = cus.address1;
                l_address2.Text      = cus.address2;
                l_address3.Text      = cus.address3;
                l_phone_number1.Text = cus.phone_number1;
                l_phone_number2.Text = cus.phone_number2;
                l_phone_number3.Text = cus.phone_number3;
                l_mail_address.Text  = cus.mail_address;
            }
            else
            {
                l_customer_code.Visible = false;
                l_customer_name.Visible = false;
                l_birthday.Visible      = false;
                l_age.Visible           = false;
                l_sex.Visible           = false;
                l_postal_code.Visible   = false;
                l_address1.Visible      = false;
                l_address2.Visible      = false;
                l_address3.Visible      = false;
                l_phone_number1.Visible = false;
                l_phone_number2.Visible = false;
                l_phone_number3.Visible = false;
                l_mail_address.Visible  = false;
            }

            //コンボボックス設定
            d_tenpomei.DataSource        = DB.m_store.getStoreNameList();
            d_shisetumei.DataSource      = DB.m_facility.getFacilityNameList(facility_reservation.store_code);
            d_satueisya.DataSource       = DB.m_staff.getStaffNameList(facility_reservation.store_code);
            d_select_name.DataSource     = DB.m_staff.getStaffNameList(facility_reservation.store_code);
            d_tasukukubun.DataSource     = DB.m_task.getTaskNameList();
            d_satsueimokuteki.DataSource = Enum.GetValues(typeof(Utile.Data.撮影目的));
            // 初期値設定
            d_tenpomei.SelectedIndex = d_tenpomei.FindStringExact(DB.m_store.getSingle(facility_reservation.store_code).store_name);
            if (facility_reservation.facility_code == MainForm.Reservation_timetable.scheduleLabel)
            {
                d_shisetumei.SelectedIndex = -1;
            }
            else
            {
                d_shisetumei.SelectedIndex = d_shisetumei.FindStringExact(DB.m_facility.getSingle(facility_reservation.store_code, facility_reservation.facility_code).facility_name);
            }
            var staff = DB.m_staff.getSingleName(facility_reservation.store_code, facility_reservation.photographer);

            if (staff != null)
            {
                d_satueisya.SelectedIndex   = d_satueisya.FindStringExact(staff.staff_name);
                d_select_name.SelectedIndex = d_select_name.FindStringExact(staff.staff_name);
            }
            else
            {
                d_satueisya.SelectedIndex   = -1;
                d_select_name.SelectedIndex = -1;
            }
            DB.m_task task = DB.m_task.getSingle(facility_reservation.task_class);
            if (task != null)
            {
                d_tasukukubun.SelectedIndex = d_tasukukubun.FindStringExact(task.task_name);
            }
            else
            {
                d_tasukukubun.SelectedIndex = 0;
            }
            if (facility_reservation.shooting_purpose == null)
            {
                d_satsueimokuteki.SelectedIndex = 0;
            }
            else
            {
                d_satsueimokuteki.SelectedIndex = d_satsueimokuteki.FindStringExact(facility_reservation.shooting_purpose);
            }

            //テキスト・カレンダー設定
            d_start_date.Value = facility_reservation.start_date;
            d_start_time.Text  = facility_reservation.start_time.ToString(@"hh\:mm");
            if (facility_reservation.end_date != DateTime.MinValue)
            {
                d_end_date.Value = facility_reservation.end_date;
            }
            else
            {
                d_end_date.Value = DateTime.Today.Date;
            }
            if (facility_reservation.end_time != TimeSpan.MinValue)
            {
                d_end_time.Text = (facility_reservation.start_time + TimeSpan.FromHours(1)).ToString(@"hh\:mm");
            }
            else
            {
                d_end_time.Text = "";
            }
            if (facility_reservation.selection_start_date != null && facility_reservation.selection_start_date.Value != DateTime.MinValue)
            {
                d_select_start_date.Value = facility_reservation.selection_start_date.Value;
            }
            else
            {
                d_select_start_date.Value = facility_reservation.start_date;
            }
            if (facility_reservation.selection_start_time != null && facility_reservation.selection_start_time.Value != TimeSpan.MinValue)
            {
                d_select_start_time.Text = facility_reservation.selection_start_time.Value.ToString(@"hh\:mm");
            }
            else
            {
                d_select_start_time.Text = facility_reservation.start_time.ToString(@"hh\:mm");
            };
            if (facility_reservation.selection_end_date != null && facility_reservation.selection_end_date.Value != DateTime.MinValue)
            {
                d_select_end_date.Value = facility_reservation.selection_end_date.Value;
            }
            else
            {
                d_select_end_date.Value = facility_reservation.end_date;
            }
            if (facility_reservation.selection_end_time != null && facility_reservation.selection_end_time.Value != TimeSpan.MinValue)
            {
                d_select_end_time.Text = facility_reservation.selection_end_time.Value.ToString(@"hh\:mm");
            }
            else
            {
                d_select_end_time.Text = (facility_reservation.start_time + TimeSpan.FromHours(1)).ToString(@"hh\:mm");
            };
            d_yoyakusya.Text = facility_reservation.reservator;
            if (facility_reservation.cancellation_date != null && facility_reservation.cancellation_date.Value != DateTime.MinValue)
            {
                d_tyushi.Value   = facility_reservation.cancellation_date.Value;
                d_tyushi.Checked = true;
            }
            else
            {
                d_tyushi.Value   = DateTime.Today.Date;
                d_tyushi.Checked = false;
            }

            d_tekiyou.Text = facility_reservation.remarks;

            //リスト更新
            if (MainForm.session_t_reception != null)
            {
                setYoyakuTabList(MainForm.session_t_reception.reception_code);
            }
            sescheduleTabList(facility_reservation.start_date, facility_reservation.store_code);

            //スケジュール切り替え
            if (facility_reservation.facility_code == MainForm.Reservation_timetable.scheduleLabel)
            {
                d_check.Checked = true;
            }
            else
            {
                d_check.Checked = false;
            }
            changeSchedule();

            //変更チェックリセット
            mod.reset();

            //入力チェックリセット
            chk.clear();
        }