当前位置: 首页>>代码示例>>C#>>正文


C# ReceptionTaskBO.GetListFoods_ByIDMenu方法代码示例

本文整理汇总了C#中BussinessLogic.ReceptionTaskBO.GetListFoods_ByIDMenu方法的典型用法代码示例。如果您正苦于以下问题:C# ReceptionTaskBO.GetListFoods_ByIDMenu方法的具体用法?C# ReceptionTaskBO.GetListFoods_ByIDMenu怎么用?C# ReceptionTaskBO.GetListFoods_ByIDMenu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BussinessLogic.ReceptionTaskBO的用法示例。


在下文中一共展示了ReceptionTaskBO.GetListFoods_ByIDMenu方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: frmRpt_DetailMenus

        public frmRpt_DetailMenus(int IDMenu,int IDBookingHall)
        {
            InitializeComponent();
            this.IDMenu = IDMenu;
            this.IDBookingHall = IDBookingHall;
            FoodsBO aFoodsBO = new FoodsBO();
            MenusBO aMenusBO = new MenusBO();
            ReceptionTaskBO aReceptionTaskBO = new ReceptionTaskBO();
            List<Foods> aListTemp = aReceptionTaskBO.GetListFoods_ByIDMenu(this.IDMenu);
            List<Foods> aListFoods = new List<Foods>();

            foreach (Foods item in aListTemp)
            {
                Foods aFoods = aFoodsBO.Select_ByID(item.ID);
                if (aFoods.Image1 != null)
                {
                    if (aFoods.Image1.Length <= 0)
                    {
                        Image image = SaleManagement.Properties.Resources.logo_nkcp_small;
                        image = image.GetThumbnailImage(70,70, null, IntPtr.Zero);
                        Byte[] aImageByte = this.ConvertImageToByteArray(image);
                        aFoods.Image1 = aImageByte;
                    }
                }
                else
                {
                    Image image = SaleManagement.Properties.Resources.logo_nkcp_small;
                    image = image.GetThumbnailImage(70,70, null, IntPtr.Zero);
                    Byte[] aImageByte = this.ConvertImageToByteArray(image);
                    aFoods.Image1 = aImageByte;
                }

                aListFoods.Add(aFoods);
            }

            Menus aMenus = aMenusBO.Select_ByID(this.IDMenu);
            lblNameMenu.Text = aMenus.Name;
            //danh sach cac mon an co trong thuc don
            this.DataSource = aListFoods;
            picImage1Food.DataBindings.Add("Image", this.DataSource, "Image1");
            colNameFood.DataBindings.Add("Text", this.DataSource, "Name");
            colName1Food.DataBindings.Add("Text", this.DataSource, "Name1");
            colName2Food.DataBindings.Add("Text", this.DataSource, "Name2");
            colName3Food.DataBindings.Add("Text", this.DataSource, "Name3");
            // Thông tin buổi tiệc
            BookingHallsBO aBookingHallsBO = new BookingHallsBO();
            BookingHalls aTemp = aBookingHallsBO.Select_ByID(IDBookingHall);
            lblStartTime.Text = aTemp.StartTime.ToString();
            lblEndTime.Text = aTemp.EndTime.ToString();
            HallsBO aHallsBO = new HallsBO();
            lblHallSku.Text = aHallsBO.Select_ByCodeHall(aTemp.CodeHall,1).Sku;
            BookingHsBO aBookingHsBO = new BookingHsBO();
            lblSubject.Text = aBookingHsBO.Select_ByID(aTemp.IDBookingH).Subject;
        }
开发者ID:BruceleeThanh,项目名称:Pro_Government_0207,代码行数:54,代码来源:frmRpt_DetailMenus.cs

示例2: LoadDataListSelectFoods

 //hiennv
 public void LoadDataListSelectFoods(int ID)
 {
     try
     {
         FoodsBO aFoodsBO = new FoodsBO();
         ReceptionTaskBO aReceptionTaskBO = new ReceptionTaskBO();
         List<Foods> aListTemp = aReceptionTaskBO.GetListFoods_ByIDMenu(ID);
         foreach (Foods item in aListTemp)
         {
             Foods aFoods = aFoodsBO.Select_ByID(item.ID);
             if (aFoods.Image1 != null)
             {
                 if (aFoods.Image1.Length > 0)
                 {
                     Image image = this.ConvertByteArrayToImage(aFoods.Image1);
                     image = image.GetThumbnailImage(50, 50, null, IntPtr.Zero);
                     Byte[] aImageByte = this.ConvertImageToByteArray(image);
                     aFoods.Image1 = aImageByte;
                 }
                 else
                 {
                     Image image = RoomManager.Properties.Resources.logo_nkcp_small;
                     image = image.GetThumbnailImage(50, 50, null, IntPtr.Zero);
                     Byte[] aImageByte = this.ConvertImageToByteArray(image);
                     aFoods.Image1 = aImageByte;
                 }
             }
             else
             {
                 Image image = RoomManager.Properties.Resources.logo_nkcp_small;
                 image = image.GetThumbnailImage(50, 50, null, IntPtr.Zero);
                 Byte[] aImageByte = this.ConvertImageToByteArray(image);
                 aFoods.Image1 = aImageByte;
             }
             this.aMenusEN.aListFoods.Add(aFoods);
         }
         dgvSelectFoods.DataSource = this.aMenusEN.aListFoods;
         dgvSelectFoods.RefreshDataSource();
     }
     catch (Exception ex)
     {
         MessageBox.Show("frmUpd_Menus.LoadDataListSelectFoods\n" + ex.ToString(), "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
开发者ID:BruceleeThanh,项目名称:Pro_Government_0207,代码行数:45,代码来源:frmUpd_Menus.cs

示例3: frmLst_DetailMenus_Load

        private void frmLst_DetailMenus_Load(object sender, EventArgs e)
        {
            try
            {

                MenusBO aMenusBO = new MenusBO();
                Menus aMenus = aMenusBO.Select_ByID(this.IDMenu);
                lblNameMenu.Text = aMenus.Name;

                ReceptionTaskBO aReceptionTaskBO = new ReceptionTaskBO();
                FoodsBO aFoodsBO = new FoodsBO();
                List<Foods> aListTemp = aReceptionTaskBO.GetListFoods_ByIDMenu(this.IDMenu);
                List<Foods> aListFoods = new List<Foods>();

                foreach (Foods item in aListTemp)
                {
                    Foods aFoods = aFoodsBO.Select_ByID(item.ID);
                    if (aFoods.Image1 != null)
                    {
                        if (aFoods.Image1.Length <= 0)
                        {
                           Image image = SaleManagement.Properties.Resources.logo_nkcp_small;
                            image = image.GetThumbnailImage(70,70, null, IntPtr.Zero);
                            Byte[] aImageByte = this.ConvertImageToByteArray(image);
                            aFoods.Image1 = aImageByte;
                        }
                    }
                    else
                    {
                        Image image = SaleManagement.Properties.Resources.logo_nkcp_small;
                        image = image.GetThumbnailImage(70,70, null, IntPtr.Zero);
                        Byte[] aImageByte = this.ConvertImageToByteArray(image);
                        aFoods.Image1 = aImageByte;
                    }
                    aListFoods.Add(aFoods);

                }
                dgvFoods.DataSource = aListFoods;
                dgvFoods.RefreshDataSource();

            }
            catch (Exception ex)
            {
                MessageBox.Show("frmLst_DetailMenus.frmLst_DetailMenus_Load\n" + ex.ToString(), "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
开发者ID:BruceleeThanh,项目名称:Pro_Government_0207,代码行数:46,代码来源:frmLst_DetailMenus.cs


注:本文中的BussinessLogic.ReceptionTaskBO.GetListFoods_ByIDMenu方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。