public WindowBanHangTachBan(ControlLibrary.UCFloorPlan uc,Data.Transit transit, Data.BOTachGopBan tachban)
 {
     mTransit = transit;
     mUCFloorPlan = uc;
     mBOTachGopBan = tachban;            
     InitializeComponent();
 }
        public override TabDefinition GetTabDefinition()
        {
            var controls = new List <ControlDefinition>();

            controls.Add(ControlLibrary.CreateRandomButton());
            controls.Add(new ButtonDefinition()
            {
                Id = controls[0].Id, TemplateAlias = controls[0].TemplateAlias, Title = "Hi"
            });
            if (SPContext.Current.Web.CurrentUser.IsSiteAdmin)
            {
                controls.Add(ControlLibrary.CreateRandomButton());
            }

            return(new TabDefinition()
            {
                Id = "CommonTasks",
                Title = "Common tasks",
                Groups = new GroupDefinition[]
                {
                    new GroupDefinition()
                    {
                        Id = "Sample",
                        Title = "Sample",
                        Template = GroupTemplateLibrary.SimpleTemplate,
                        Controls = controls.ToArray()
                    }
                }
            });
        }
 private void uCFloorPlan1__OnEventFloorPlan(ControlLibrary.POSButtonTable tbl)
 {            
     mTransit.Ban = tbl._Ban;
     btnForcus.Focus();
     WindowBanHang win = new WindowBanHang(mTransit, uCFloorPlan1);
     win.ShowDialog();
 }
 private void uCFloorPlan1__OnEventFloorPlan(ControlLibrary.POSButtonTable tbl)
 {
     if (mTableButton != null)
     {
         mTableButton._ButtonTableStatusColor = ControlLibrary.POSButtonTable.POSButtonTableStatusColor.None;
     }
     tbl._ButtonTableStatusColor = ControlLibrary.POSButtonTable.POSButtonTableStatusColor.Ordered;
     mTableButton = tbl;
     txtTenBan.Text = tbl._Ban.TenBan;
     mIsLockText = true;
     sliderNgang.Value = (int)(uCFloorPlan1._CAIDATBAN.TableWidth > 0 ? tbl._Ban.Width / uCFloorPlan1._CAIDATBAN.TableWidth * 100 : 0);
     sliderCao.Value = (int)(uCFloorPlan1._CAIDATBAN.TableHeight > 0 ? tbl._Ban.Height / uCFloorPlan1._CAIDATBAN.TableHeight * 100 : 0);
     mIsLockText = false;
     if (tbl._Ban.Hinh != null && tbl._Ban.Hinh.Length > 0)
     {
         btnHinhDaiDien.Image = Utilities.ImageHandler.BitmapImageFromByteArray(tbl._Ban.Hinh);
     }
     else
     {
         if (uCFloorPlan1._CAIDATBAN.TableImage != null && uCFloorPlan1._CAIDATBAN.TableImage.Length > 0)
         {
             btnHinhDaiDien.Image = Utilities.ImageHandler.BitmapImageFromByteArray(uCFloorPlan1._CAIDATBAN.TableImage);
         }
         else
         {
             var uriSource = new Uri(@"/ControlLibrary;component/Images/NoImages.jpg", UriKind.Relative);
             btnHinhDaiDien.Image = new BitmapImage(uriSource);
         }
     }
 }
 public WindowBanHangChuyenBan(Data.Transit tran,ControlLibrary.UCFloorPlan uc)
 {
     mTransit = tran;
     mUCFloorPlan = uc;
     mBOChuyenBan = new Data.BOChuyenBan(mTransit);
     InitializeComponent();
 }
 public WindowBanHang(Data.Transit transit, ControlLibrary.UCFloorPlan sodoban)
 {
     mTransit = transit;
     mUCFloorPlan = sodoban;
     InitializeComponent();
     PhanQuyen();
 }        
Beispiel #7
0
        public override void FeatureActivated(SPFeatureReceiverProperties properties)
        {
            SPWeb web = (properties.Feature.Parent as SPSite).RootWeb;

            var button1 = ControlLibrary.CreateRandomButton();

            var ribbonCustomAction = new RibbonCustomAction();

            // We need assign TemplateAlias manually to buttons, if they will be deployed separately
            button1.TemplateAlias = "o1";
            ribbonCustomAction.AddControl(button1, "Ribbon.ListItem.New", 1);

            ribbonCustomAction.Provision(properties.Feature.DefinitionId, web, ListTypes.GenericList);
        }
Beispiel #8
0
        public override void FeatureActivated(SPFeatureReceiverProperties properties)
        {
            SPSite site = properties.Feature.Parent as SPSite;

            var buttonDelete = ControlLibrary.StandardButtons.ListItem.Manage_Delete("");

            buttonDelete.Title = "Remove";

            var buttonNew = new ButtonDefinition()
            {
                Id    = "NewProject",
                Title = "New",
            };

            var group = new GroupDefinition()
            {
                Id       = "MyGroup",
                Title    = "Custom controls",
                Template = Libraries.GroupTemplateLibrary.SimpleTemplate,
                Controls = new ControlDefinition[]
                {
                    buttonNew,
                    buttonDelete
                }
            };

            var ribbonCustomAction = new RibbonCustomAction();

            ribbonCustomAction.AddControlGroup(group, SPRibbonIds.ListItem.Id, 25);
            ribbonCustomAction.RemoveRibbonElement(SPRibbonIds.ListItem.Groups.New.Id);

            // We need assign TemplateAlias manually to buttons, if they will be deployed separately
            var button1 = ControlLibrary.CreateRandomButton();

            button1.TemplateAlias = "o1";
            ribbonCustomAction.AddControl(button1, SPRibbonIds.ListItem.Groups.Manage.Id, 1);
            ribbonCustomAction.Provision(properties.Definition.Id, site, ListTypes.GenericList);
        }
 private void LookButton(ControlLibrary.POSButtonMain btn, bool value)
 {
     if (value == true)
     {
         btn.IsEnabled = true;
         //btn.VisibilityMain = System.Windows.Visibility.Visible;
         btn.Opacity = 1;
     }
     else
     {
         btn.IsEnabled = false;
         //btn.VisibilityMain = System.Windows.Visibility.Hidden;
         btn.Opacity = 0.3;
     }
 }
 public WindowSoDoBanThemSoNhieu(ControlLibrary.UCFloorPlan uc)
 {
     mUCFloorPlan = uc;
     InitializeComponent();
 }
 private void LookButton(ControlLibrary.POSButtonMain btn, bool value, int row, int col)
 {
     if (value == true)
     {
         btn.Visibility = System.Windows.Visibility.Visible;
         Grid.SetRow(btn, row);
         Grid.SetColumn(btn, col);
     }
     else
     {
         btn.Visibility = System.Windows.Visibility.Collapsed;
     }
 }
 public WindowChucNangSoDoBan(ControlLibrary.UCFloorPlan uc,Data.Transit transit)
 {
     mUCFloorPlan = uc;
     mTransit = transit;
     InitializeComponent();
 }