private void btnAllPrint_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            SaleFoodOnline data = GetRow();

            PrintKitchen("چاپ مجدد", data);
            PrintCustomreFish("چاپ مجدد", data);
        }
 bool PrintKitchen(string State, SaleFoodOnline salefood)
 {
     try
     {
         rptkithchen.DataSource      = salefood;
         rptkithchen.StateFact.Value = State;
         if (settingServer != null)
         {
             rptkithchen.xrLogo.Image = byteArrayToImage(settingServer.Img);
         }
         rptkithchen.RequestParameters = false;
         rptkithchen.PrintingSystem.ShowMarginsWarning = true;
         var rp = new ReportPrintTool(rptkithchen);
         rp.PrinterSettings.Copies      = 1;
         rp.PrinterSettings.PrinterName = _SettingPrinter.PrinterAshpazkhane;
         rp.Print();
         //rptkithchen.CreateDocument();
         //SaleOnline.Rerport.frmPrview frm = new Rerport.frmPrview();
         //frm.documentViewer1.DocumentSource = rptkithchen;
         //frm.Show();
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
        bool PrintCustomreFish(string State, SaleFoodOnline salefood)
        {
            try
            {
                rptcustomer.DataSource        = salefood;
                rptcustomer.StateFact.Value   = State;
                rptcustomer.StringPrice.Value = JntNum2Text.Num2Text.ToFarsi(salefood.SumNetPrice.Value);

                if (settingServer != null)
                {
                    rptcustomer.xrLogo.Image  = byteArrayToImage(settingServer.Img);
                    rptcustomer.Address.Value = settingServer.Address;
                    rptcustomer.Tell.Value    = settingServer.Tell;
                    rptcustomer.motto.Value   = settingServer.Motto;
                }
                rptcustomer.RequestParameters = false;
                rptcustomer.PrintingSystem.ShowMarginsWarning = true;
                var rp = new ReportPrintTool(rptcustomer);
                rp.PrinterSettings.Copies      = 1;
                rp.PrinterSettings.PrinterName = _SettingPrinter.PrinterCustomer;
                rp.Print();
                //rptcustomer.CreateDocument();
                //SaleOnline.Rerport.frmPrview frm = new Rerport.frmPrview();
                //frm.documentViewer1.DocumentSource = rptcustomer;
                //frm.Show();
                return(true);
            }
            catch (Exception ex)
            {
                return(false);
            }
        }
        /// <summary>
        /// تایید وضعیت چاپ فیش
        /// </summary>
        /// <param name="salefood"></param>
        void IsPrintFish(SaleFoodOnline salefood)
        {
            SaleFoodOnline fact = ServicesSaleFood.GetSalefood(salefood.SaleFoodIDFact.Value);

            fact.PrintState = true;
            ServicesSaleFood.UpdateSaleFoodOnline(fact);
        }
 internal int UpdateSaleFoodOnline(SaleFoodOnline salefood)
 {
     db.Entry(salefood).State = System.Data.Entity.EntityState.Modified;
     return(db.SaveChanges());
 }
示例#6
0
 void GetList(SaleFoodOnline fact)
 {
     li.Add(fact);
     gridControl1.DataSource = null;
     gridControl1.DataSource = li;
 }
示例#7
0
 public static int UpdateSaleFoodOnline(SaleFoodOnline salefood)
 {
     return(repo.UpdateSaleFoodOnline(salefood));
 }