private void treeSell_MouseDoubleClick(object sender, MouseEventArgs e) { TreeListHitInfo hi = treeSell.CalcHitInfo(e.Location); if (hi.HitInfoType == DevExpress.XtraTreeList.HitInfoType.Cell) { // TreeList'ten marka seçildiğnide yapılacak işlemler. if (hi.Node[cololaylar].ToString() == "Müşteri Cari Hesapları") { Sell.FrmCurrentList list = new Sell.FrmCurrentList(); list.MdiParent = this; list.Show(); } else if (hi.Node[cololaylar].ToString() == "Satış Fiyat Listeleri") { Sell.FrmSellPrices list = new Sell.FrmSellPrices(); FormFill(@"SELECT PL.Ref as Ref, PL.code AS [Liste Kodu], PL.name AS [Liste Adı] FROM StSellPriceList PL with(nolock) WHERE PL.active = 1 /*AND @date between PL.startDate and PL.finishDate*/ ", "Satış Fiyatları", list); } else if (hi.Node[cololaylar].ToString() == "Satış Kampanyaları") { Sell.FrmCampaings list = new Sell.FrmCampaings(); FormFill(@"SELECT PL.Ref as Ref, PL.code AS [Liste Kodu], PL.name AS [Liste Adı] FROM StSellCampaing PL with(nolock) WHERE PL.active = 1/* AND {0} between PL.startDate and PL.finishDate*/ ", "Satış Kampanyaları", list); } else if (hi.Node[cololaylar].ToString() == "İndirimler") { Sell.FrmDiscount list = new Sell.FrmDiscount(); db.AddParameterValue("@date", DateTime.Now.ToShortDateString(), SqlDbType.Date); FormFill(@"SELECT PL.Ref as Ref, PL.code AS [Liste Kodu], PL.name AS [Liste Adı] FROM StSellDiscount PL with(nolock) WHERE PL.active = 1 /*AND GETDATE() between PL.startDate and PL.finishDate*/ ", "İndirimler", list); } else if (hi.Node[cololaylar].ToString() == "Satış Siparişleri") { Sell.FrmSellOrder list = new Sell.FrmSellOrder(); db.AddParameterValue("@date", DateTime.Now.ToShortDateString(), SqlDbType.Date); FormFill(@" SELECT SO.Ref,SO.Code as Kod,SO.name as [Adı],SO.date as [Tarih],SW.name as Şube,SB.name as Depo, CA.name as Müşteri, SO.totalPrice as [Toplam Tutar] FROM StSellOrder as SO INNER JOIN StCustomerAccount as CA ON SO.customerRef = CA.Ref INNER JOIN AtlasSys.dbo.sysWhouse as SW on SO.WhouseRef = SW.Ref INNER JOIN AtlasSys.dbo.sysBranch as SB ON SO.BranchRef = SB.Ref ", "Satış Siparişleri", list); } } }
private void treeBuy_MouseDoubleClick(object sender, MouseEventArgs e) { TreeListHitInfo hi = treeBuy.CalcHitInfo(e.Location); if (hi.HitInfoType == DevExpress.XtraTreeList.HitInfoType.Cell) { if (hi.Node[cololaylar].ToString() == "Tedarikçi Cari Hesapları") { Sell.FrmCurrentList list = new Sell.FrmCurrentList(); list.MdiParent = this; list.Show(); } if (hi.Node[cololaylar].ToString() == "Hizmet Tanımları") { Buy.FrmBuyServices services = new Buy.FrmBuyServices(); services.MdiParent = this; services.Show(); } else if (hi.Node[cololaylar].ToString() == "Satınalma Fiyat Listeleri") { Buy.FrmBuyList list = new Buy.FrmBuyList(); db.AddParameterValue("@date", DateTime.Now.ToShortDateString(), SqlDbType.Date); FormFill(@"SELECT PL.Ref as Ref, PL.code AS [Liste Kodu], PL.name AS [Liste Adı] FROM StBuyPriceList PL with(nolock) WHERE PL.active = 1 /*AND @date between PL.startDate and PL.finishDate*/ ", "Alış Fiyatları", list); } else if (hi.Node[cololaylar].ToString() == "Satınalma Talebi") { Buy.FrmBuyOrder order = new Buy.FrmBuyOrder(); FormFill(@"SELECT BO.Ref as Ref, BO.code AS [Sipariş Kodu], BO.name AS [Sipariş Adı], BO.Date AS [Sipariş Tarihi], BO.totalPrice as [Toplam Tutar] ,BR.name as [Şube], WH.name as [Depo] FROM StBuyOrder BO with(nolock) INNER JOIN AtlasSys.dbo.sysBranch BR ON BR.Ref = BO.branchRef INNER JOIN AtlasSys.dbo.sysWhouse WH ON WH.Ref = BO.whouseRef WHERE (BO.state = 1) ", "Satınalma Talepleri", order); } else if (hi.Node[cololaylar].ToString() == "Hizmet Satınalma Talebi") { Buy.FrmServiceOrder order = new Buy.FrmServiceOrder(); FormFill(@"SELECT BO.Ref as Ref, BO.code AS [Hizmet Kodu], BO.name AS [Hizmet Adı], BO.Date AS [Hizmet Tarihi],BO.totalPrice as [Toplam Tutar], BR.name as [Şube] FROM StBuyServiceOrder BO with(nolock) INNER JOIN AtlasSys.dbo.sysBranch BR ON BR.Ref = BO.branchRef WHERE (BO.state = 1) ", "Hizmet Satınalma Talepleri", order); } else if (hi.Node[cololaylar].ToString() == "Toplu Satınalma Talebi Kapatma") { Buy.FrmOrderList orderList = new Buy.FrmOrderList(); orderList.MdiParent = this; orderList.Show(); } else if (hi.Node[cololaylar].ToString() == "Alım İade Faturası") { Buy.FrmBuyReturn Ret = new Buy.FrmBuyReturn(); FormFill(@"", "Alım İade Faturası", Ret); } } }