/// <summary>
        /// Khởi tạo các combobox
        /// </summary>
        private void LoadCombobox()
        {
            // khởi tạo combobox
            AutoComboBox auto = new AutoComboBox();
            // Khởi tạo điều kiện gọi danh mục
            List <string> lstDieuKien = new List <string>();

            // khởi tạo combobox
            auto = new AutoComboBox();
            lstDieuKien.Add(ClientInformation.TenDangNhap);
            lstDieuKien.Add(ClientInformation.MaDonViQuanLy);
            auto.GenAutoComboBox(ref lstSourceChiNhanh, ref cmbChiNhanh, DatabaseConstant.DanhSachTruyVan.COMBOBOX_CNHANH.getValue(), lstDieuKien, ClientInformation.MaDonVi);

            //// khởi tạo combobox
            LoadComboBoxPhongGD();


            //LoadComboBoxXaPhuong
            LoadComboBoxXaPhuong();

            //LoadComboBoxThonAp
            LoadComboBoxThonAp();

            //LoadComboboxSanPham
            LoadComboboxSanPham();

            // khởi tạo dữ liệu nhóm
            auto = new AutoComboBox();
            Telerik.Windows.Controls.RadComboBox cmdNhomAll = new Telerik.Windows.Controls.RadComboBox();
            auto.GenAutoComboBox(ref lstSourceNhomAll, ref cmdNhomAll, DatabaseConstant.DanhSachTruyVan.COMBOBOX_NHOM_ALL.getValue());
            LoadDuLieuNhom();

            Dispatcher.CurrentDispatcher.DelayInvoke("cmbLoaiTien", () =>
            {
                lstDieuKien = new List <string>();
                lstDieuKien.Add(DatabaseConstant.DanhMuc.DONG_TIEN_CAC_NUOC.getValue());
                // khởi tạo combobox
                auto = new AutoComboBox();
                auto.GenAutoComboBox(ref lstSourceLoaiTien, ref cmbLoaiTien, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien);
            }, TimeSpan.FromSeconds(0));

            Dispatcher.CurrentDispatcher.DelayInvoke("cmbNgonNgu", () =>
            {
                lstDieuKien = new List <string>();
                lstDieuKien.Add(DatabaseConstant.DanhMuc.NGON_NGU.getValue());
                // khởi tạo combobox
                auto = new AutoComboBox();
                auto.GenAutoComboBox(ref lstSourceNgonNgu, ref cmbNgonNgu, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiNgonNguBaoCao.vi_VN.layGiaTri());
            }, TimeSpan.FromSeconds(0));

            Dispatcher.CurrentDispatcher.DelayInvoke("cmbDinhDang", () =>
            {
                lstDieuKien = new List <string>();
                lstDieuKien.Add(DatabaseConstant.DanhMuc.DINH_DANG_BAO_CAO.getValue());
                // khởi tạo combobox
                auto = new AutoComboBox();
                auto.GenAutoComboBox(ref lstSourceDinhDang, ref cmbDinhDang, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiDinhDangBaoCao.WORD.layGiaTri());
                cmbDinhDang.SelectedIndex = lstSourceDinhDang.FindIndex(e => e.KeywordStrings[0].Equals(ApplicationConstant.LoaiDinhDangBaoCao.EXCEL.layGiaTri()));
            }, TimeSpan.FromSeconds(0));
        }
        public void FormControlAddress_CityStateReferenceByZipCodeCompleted(Object sender, Server.Application.CityStateReferenceByZipCodeCompletedEventArgs e)
        {
            // RELINK CITY REFERENCES

            foreach (Client.Core.Forms.Control currentControl in form.GetAllControls())
            {
                if (currentControl.ControlType == Mercury.Server.Application.FormControlType.Address)
                {
                    Client.Core.Forms.Controls.Address addressControl = (Client.Core.Forms.Controls.Address)currentControl;

                    if (e.Result.ZipCode == addressControl.ZipCode)
                    {
                        Telerik.Windows.Controls.RadComboBox cityComboBox = (Telerik.Windows.Controls.RadComboBox)FindName(addressControl.ControlId.ToString() + "_City");

                        Telerik.Windows.Controls.RadComboBox stateComboBox = (Telerik.Windows.Controls.RadComboBox)FindName(addressControl.ControlId.ToString() + "_State");

                        if ((stateComboBox != null) && (cityComboBox != null) && (e.Result != null))
                        {
                            addressControl.State = e.Result.State;

                            addressControl.City = e.Result.City;
                        }
                    }
                }
            }

            return;
        }
        public void FormControlAddress_StateReferenceCompleted(Object sender, Server.Application.StateReferenceCompletedEventArgs e)
        {
            // FINISH LINKING REFERENCE CONTROLS

            foreach (Client.Core.Forms.Control currentControl in form.GetAllControls())
            {
                if (currentControl.ControlType == Mercury.Server.Application.FormControlType.Address)
                {
                    Client.Core.Forms.Controls.Address addressControl = (Client.Core.Forms.Controls.Address)currentControl;

                    Telerik.Windows.Controls.RadComboBox stateComboBox = (Telerik.Windows.Controls.RadComboBox)FindName(addressControl.ControlId.ToString() + "_State");

                    if (stateComboBox != null)
                    {
                        stateComboBox.ItemsSource = e.Result.ResultList;

                        // stateComboBox.SelectedValue = addressControl.State;

                        stateComboBox.SetBinding(Telerik.Windows.Controls.RadComboBox.SelectedValueProperty, renderEngine.PropertyDataBinding("State", addressControl, System.Windows.Data.BindingMode.OneWay));
                    }
                }
            }

            return;
        }
예제 #4
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/softwareEngineering;component/UpdatePage.xaml", System.UriKind.Relative));
     this.RBI_BusyBar_Up      = ((Telerik.Windows.Controls.RadBusyIndicator)(this.FindName("RBI_BusyBar_Up")));
     this.LayoutRoot          = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.RTB_ToolBar         = ((Telerik.Windows.Controls.RadToolBar)(this.FindName("RTB_ToolBar")));
     this.stocknumber1        = ((System.Windows.Controls.TextBox)(this.FindName("stocknumber1")));
     this.stockdate1          = ((Telerik.Windows.Controls.RadDateTimePicker)(this.FindName("stockdate1")));
     this.RadBtn_Update_Query = ((DSV.Controls.Menu.Ribbon.RibbonButton)(this.FindName("RadBtn_Update_Query")));
     this.LayoutRoot1         = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot1")));
     this.CancelButton        = ((System.Windows.Controls.Button)(this.FindName("CancelButton")));
     this.OKButton            = ((System.Windows.Controls.Button)(this.FindName("OKButton")));
     this.stocknumber2        = ((System.Windows.Controls.TextBox)(this.FindName("stocknumber2")));
     this.producingarea2      = ((System.Windows.Controls.TextBox)(this.FindName("producingarea2")));
     this.goodname2           = ((System.Windows.Controls.TextBox)(this.FindName("goodname2")));
     this.productiondate2     = ((Telerik.Windows.Controls.RadDateTimePicker)(this.FindName("productiondate2")));
     this.category2           = ((System.Windows.Controls.TextBox)(this.FindName("category2")));
     this.deadline2           = ((Telerik.Windows.Controls.RadDateTimePicker)(this.FindName("deadline2")));
     this.grade2        = ((Telerik.Windows.Controls.RadComboBox)(this.FindName("grade2")));
     this.stockdate2    = ((Telerik.Windows.Controls.RadDateTimePicker)(this.FindName("stockdate2")));
     this.unit2         = ((System.Windows.Controls.TextBox)(this.FindName("unit2")));
     this.stockperson2  = ((System.Windows.Controls.TextBox)(this.FindName("stockperson2")));
     this.unitprice2    = ((System.Windows.Controls.TextBox)(this.FindName("unitprice2")));
     this.supplyperson2 = ((System.Windows.Controls.TextBox)(this.FindName("supplyperson2")));
     this.quantity2     = ((System.Windows.Controls.TextBox)(this.FindName("quantity2")));
     this.moneyamount2  = ((System.Windows.Controls.TextBox)(this.FindName("moneyamount2")));
     this.remark2       = ((System.Windows.Controls.TextBox)(this.FindName("remark2")));
 }
        public void FormControlAddress_CityReferenceByStateCompleted(Object sender, Server.Application.CityReferenceByStateCompletedEventArgs e)
        {
            // RELINK CITY REFERENCES

            foreach (Client.Core.Forms.Control currentControl in form.GetAllControls())
            {
                if (currentControl.ControlType == Mercury.Server.Application.FormControlType.Address)
                {
                    Client.Core.Forms.Controls.Address addressControl = (Client.Core.Forms.Controls.Address)currentControl;

                    Telerik.Windows.Controls.RadComboBox cityComboBox = (Telerik.Windows.Controls.RadComboBox)FindName(addressControl.ControlId.ToString() + "_City");

                    Telerik.Windows.Controls.RadComboBox stateComboBox = (Telerik.Windows.Controls.RadComboBox)FindName(addressControl.ControlId.ToString() + "_State");

                    if ((stateComboBox != null) && (cityComboBox != null))
                    {
                        cityComboBox.ItemsSource = e.Result.Collection;

                        cityComboBox.DisplayMemberPath = "City";

                        cityComboBox.SelectedValuePath = "City";

                        cityComboBox.SetBinding(Telerik.Windows.Controls.RadComboBox.SelectedValueProperty, renderEngine.PropertyDataBinding("City", addressControl, System.Windows.Data.BindingMode.OneWay));
                    }
                }
            }

            return;
        }
예제 #6
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/softwareEngineering;component/InsertPage.xaml", System.UriKind.Relative));
     this.LayoutRoot     = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.CancelButton   = ((System.Windows.Controls.Button)(this.FindName("CancelButton")));
     this.OKButton       = ((System.Windows.Controls.Button)(this.FindName("OKButton")));
     this.stocknumber    = ((System.Windows.Controls.TextBox)(this.FindName("stocknumber")));
     this.producingarea  = ((System.Windows.Controls.TextBox)(this.FindName("producingarea")));
     this.goodname       = ((System.Windows.Controls.TextBox)(this.FindName("goodname")));
     this.productiondate = ((Telerik.Windows.Controls.RadDateTimePicker)(this.FindName("productiondate")));
     this.category       = ((System.Windows.Controls.TextBox)(this.FindName("category")));
     this.deadline       = ((Telerik.Windows.Controls.RadDateTimePicker)(this.FindName("deadline")));
     this.grade          = ((Telerik.Windows.Controls.RadComboBox)(this.FindName("grade")));
     this.stockdate      = ((Telerik.Windows.Controls.RadDateTimePicker)(this.FindName("stockdate")));
     this.unit           = ((System.Windows.Controls.TextBox)(this.FindName("unit")));
     this.stockperson    = ((System.Windows.Controls.TextBox)(this.FindName("stockperson")));
     this.unitprice      = ((System.Windows.Controls.TextBox)(this.FindName("unitprice")));
     this.supplyperson   = ((System.Windows.Controls.TextBox)(this.FindName("supplyperson")));
     this.quantity       = ((System.Windows.Controls.TextBox)(this.FindName("quantity")));
     this.moneyamount    = ((System.Windows.Controls.TextBox)(this.FindName("moneyamount")));
     this.remark         = ((System.Windows.Controls.TextBox)(this.FindName("remark")));
 }
예제 #7
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Medical.Apartment.Silverlight.UI;component/Controls/CountryPicker.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.uiDataList = ((Telerik.Windows.Controls.RadComboBox)(this.FindName("uiDataList")));
 }
예제 #8
0
        private void KhoiTaoDuLieuNhom()
        {
            lstSourceNhomAll.Clear();
            AutoComboBox  auto        = new AutoComboBox();
            List <string> lstDieuKien = new List <string>();

            lstDieuKien.Add(Convert.ToDateTime(raddtTuNgay.Value).ToString("yyyyMMdd"));
            Telerik.Windows.Controls.RadComboBox cmdNhomAll = new Telerik.Windows.Controls.RadComboBox();
            auto.GenAutoComboBox(ref lstSourceNhomAll, ref cmdNhomAll, "COMBOBOX_NHOM_KUOCVM_GN", lstDieuKien);
            LoadDuLieuNhom();
        }
        public void FormControlAddress_StateSelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
        {
            Telerik.Windows.Controls.RadComboBox stateComboBox = (Telerik.Windows.Controls.RadComboBox)sender;

            if (stateComboBox == null)
            {
                return;
            }

            if (stateComboBox.SelectedValue == null)
            {
                return;
            }

            Client.Core.Forms.Controls.Address addressControl = (Client.Core.Forms.Controls.Address)stateComboBox.Tag;

            if (addressControl == null)
            {
                return;
            }


            Boolean valueChanged = (stateComboBox.SelectedValue.ToString() != addressControl.State);

            valueChanged = ((valueChanged) && (addressControl.EnabledAndNotReadOnly));


            if (valueChanged)
            {
                addressControl.State = stateComboBox.SelectedValue.ToString();

                addressControl.AddressId = 0;

                stateComboBox.SetBinding(Telerik.Windows.Controls.RadComboBox.SelectedValueProperty, renderEngine.PropertyDataBinding("State", addressControl, System.Windows.Data.BindingMode.OneWay));

                if ((addressControl.HasEventHandler("AddressChanged")) || (addressControl.HasDependencyDataBinding))
                {
                    FormServerProcessing_ControlPanelDisable(addressControl, Mercury.Client.Core.Forms.ServerProcessRequestType.ValueChanged);

                    form.ValueChanged(addressControl, FormServerProcessCompleted);
                }
            }

            // MAKE SURE TO UPDATE CITY REFERENCE (INDEPENDENT OF CHANGE)

            // THIS COULD BE FROM A POSTBACK/SERVER-UPDATE THAT NEEDS TO RESET THE STATE TO MAINTAIN THE CITY INFORMATION

            MercuryApplication.CityReferenceByState(addressControl.State, true, FormControlAddress_CityReferenceByStateCompleted);

            return;
        }
        public void FormControlAddress_CitySelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
        {
            Telerik.Windows.Controls.RadComboBox cityComboBox = (Telerik.Windows.Controls.RadComboBox)sender;

            if (cityComboBox == null)
            {
                return;
            }

            if (cityComboBox.SelectedValue == null)
            {
                return;
            }

            Client.Core.Forms.Controls.Address addressControl = (Client.Core.Forms.Controls.Address)cityComboBox.Tag;

            if (addressControl == null)
            {
                return;
            }


            Boolean valueChanged = (cityComboBox.SelectedValue.ToString() != addressControl.City);

            valueChanged = ((valueChanged) && (addressControl.EnabledAndNotReadOnly));


            if (valueChanged)
            {
                addressControl.City = cityComboBox.SelectedValue.ToString();

                addressControl.AddressId = 0;

                cityComboBox.SetBinding(Telerik.Windows.Controls.RadComboBox.SelectedValueProperty, renderEngine.PropertyDataBinding("City", addressControl, System.Windows.Data.BindingMode.OneWay));

                if ((addressControl.HasEventHandler("AddressChanged")) || (addressControl.HasDependencyDataBinding))
                {
                    FormServerProcessing_ControlPanelDisable(addressControl, Mercury.Client.Core.Forms.ServerProcessRequestType.ValueChanged);

                    form.ValueChanged(addressControl, FormServerProcessCompleted);
                }
            }

            return;
        }
예제 #11
0
파일: FirstPage.g.i.cs 프로젝트: lcandyl/C-
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/softwareEngineering;component/FirstPage.xaml", System.UriKind.Relative));
     this.RBI_BusyBar      = ((Telerik.Windows.Controls.RadBusyIndicator)(this.FindName("RBI_BusyBar")));
     this.LayoutRoot       = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.RTB_ToolBar      = ((Telerik.Windows.Controls.RadToolBar)(this.FindName("RTB_ToolBar")));
     this.textBlock1       = ((System.Windows.Controls.TextBlock)(this.FindName("textBlock1")));
     this.radDTStartTime   = ((Telerik.Windows.Controls.RadDateTimePicker)(this.FindName("radDTStartTime")));
     this.radDTEndTime     = ((Telerik.Windows.Controls.RadDateTimePicker)(this.FindName("radDTEndTime")));
     this.RCB_Grade        = ((Telerik.Windows.Controls.RadComboBox)(this.FindName("RCB_Grade")));
     this.RadBtn_Query     = ((DSV.Controls.Menu.Ribbon.RibbonButton)(this.FindName("RadBtn_Query")));
     this.RadBtn_Insert    = ((DSV.Controls.Menu.Ribbon.RibbonButton)(this.FindName("RadBtn_Insert")));
     this.RadBtn_Update    = ((DSV.Controls.Menu.Ribbon.RibbonButton)(this.FindName("RadBtn_Update")));
     this.RadBtn_Delete    = ((DSV.Controls.Menu.Ribbon.RibbonButton)(this.FindName("RadBtn_Delete")));
     this.RadBtn_Excel     = ((DSV.Controls.Menu.Ribbon.RibbonButton)(this.FindName("RadBtn_Excel")));
     this.Img_Top          = ((System.Windows.Controls.Image)(this.FindName("Img_Top")));
     this.pdgResultGrid    = ((LIS.MainProject.Utility.Controls.PageDataGrid)(this.FindName("pdgResultGrid")));
     this.DG_InnerDataGrid = ((LIS.MainProject.Utility.Controls.ScrollDataGrid)(this.FindName("DG_InnerDataGrid")));
 }
예제 #12
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Medical.Apartment.Silverlight.UI;component/Controls/UserAccount.xaml", System.UriKind.Relative));
     this.panelUserAccount = ((System.Windows.Controls.StackPanel)(this.FindName("panelUserAccount")));
     this.lblUsername = ((System.Windows.Controls.TextBlock)(this.FindName("lblUsername")));
     this.uiUsers = ((Telerik.Windows.Controls.RadComboBox)(this.FindName("uiUsers")));
     this.lblPassword = ((System.Windows.Controls.TextBlock)(this.FindName("lblPassword")));
     this.txtPassword = ((System.Windows.Controls.PasswordBox)(this.FindName("txtPassword")));
     this.lblEmail = ((System.Windows.Controls.TextBlock)(this.FindName("lblEmail")));
     this.txtEmail = ((System.Windows.Controls.TextBox)(this.FindName("txtEmail")));
     this.gridExtraInfo = ((System.Windows.Controls.Grid)(this.FindName("gridExtraInfo")));
     this.chkAccountApproved = ((System.Windows.Controls.CheckBox)(this.FindName("chkAccountApproved")));
     this.chkResetPassword = ((System.Windows.Controls.CheckBox)(this.FindName("chkResetPassword")));
     this.chkChangePasswordQuestionAnswer = ((System.Windows.Controls.CheckBox)(this.FindName("chkChangePasswordQuestionAnswer")));
     this.txtResetPasswordInfo = ((System.Windows.Controls.TextBox)(this.FindName("txtResetPasswordInfo")));
     this.txtPasswordQuestionLabel = ((System.Windows.Controls.TextBlock)(this.FindName("txtPasswordQuestionLabel")));
     this.txtPasswordQuestion = ((System.Windows.Controls.TextBox)(this.FindName("txtPasswordQuestion")));
     this.txtPasswordAnswerLabel = ((System.Windows.Controls.TextBlock)(this.FindName("txtPasswordAnswerLabel")));
     this.txtPasswordAnswer = ((System.Windows.Controls.TextBox)(this.FindName("txtPasswordAnswer")));
     this.lblInputPassword = ((System.Windows.Controls.TextBlock)(this.FindName("lblInputPassword")));
     this.txtInputPassword = ((System.Windows.Controls.PasswordBox)(this.FindName("txtInputPassword")));
     this.ucInformation = ((Medical.Apartment.Silverlight.UI.Information)(this.FindName("ucInformation")));
     this.uiImageOnline = ((System.Windows.Controls.Image)(this.FindName("uiImageOnline")));
     this.btnUnlock = ((Medical.Apartment.Silverlight.UI.SingleClickButton)(this.FindName("btnUnlock")));
     this.btnSave = ((Medical.Apartment.Silverlight.UI.SingleClickButton)(this.FindName("btnSave")));
 }