示例#1
0
 public void viewMemberInfo(object sellNumber, EventArgs s)
 {
     if (Program.SystemMode == 1)
     {
         frmMainShopSimpleReturn frmMainShopSimpleReturn = new frmMainShopSimpleReturn(sellNumber.ToString(), "frmSearchSellResult", "");
         frmMainShopSimpleReturn.frmName  = base.Name;
         frmMainShopSimpleReturn.Location = new Point(base.Location.X, base.Location.Y);
         frmMainShopSimpleReturn.Show();
         frmMainShopSimpleReturn.Focus();
     }
     else
     {
         frmMainShopSimpleReturnWithMoney frmMainShopSimpleReturnWithMoney = new frmMainShopSimpleReturnWithMoney(sellNumber.ToString(), "frmSearchSellResult", "");
         frmMainShopSimpleReturnWithMoney.frmName  = base.Name;
         frmMainShopSimpleReturnWithMoney.Location = new Point(base.Location.X, base.Location.Y);
         frmMainShopSimpleReturnWithMoney.Show();
         frmMainShopSimpleReturnWithMoney.Focus();
     }
 }
示例#2
0
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (e.ColumnIndex == 0 && e.RowIndex == -1)
         {
             string    headerText = dataGridView1.Columns[e.ColumnIndex].HeaderText;
             string    sql        = "SELECT ds1.barcode as barcode, ds1.sellNo as sellNo, sellTime, ds1.sellTime, gl.GDName as GDName, gl.CName as CName, gl.formCode as formCode, gl.contents as contents, gl.brandName as brandName, gl.spec as spec, gl.capacity as capacity, ds1.num as num FROM ( SELECT ds.* , ms.sellTime FROM hypos_detail_sell as ds INNER JOIN hypos_main_sell as ms on ds.sellNo = ms.sellNo WHERE ms.sellTime ='" + headerText + "' ORDER BY ms.sellTime desc, ds.sellDeatialId desc  ) as ds1 LEFT JOIN hypos_GOODSLST as gl on ds1.barcode = gl.GDSNO";
             DataTable dataTable  = (DataTable)DataBaseUtilities.DBOperation(Program.ConnectionString, sql, null, CommandOperationType.ExecuteReaderReturnDataTable);
             string    sellno     = "";
             if (dataTable.Rows.Count > 0)
             {
                 sellno = (string.IsNullOrEmpty(dataTable.Rows[0]["sellNo"].ToString()) ? "0" : dataTable.Rows[0]["sellNo"].ToString());
             }
             if (Program.SystemMode == 1)
             {
                 frmMainShopSimpleReturn frmMainShopSimpleReturn = new frmMainShopSimpleReturn(sellno, "frmStatisticsRecord", "");
                 frmMainShopSimpleReturn.frmName  = base.Name;
                 frmMainShopSimpleReturn.Location = new Point(base.Location.X, base.Location.Y);
                 frmMainShopSimpleReturn.Show();
                 frmMainShopSimpleReturn.Focus();
             }
             else
             {
                 frmMainShopSimpleReturnWithMoney frmMainShopSimpleReturnWithMoney = new frmMainShopSimpleReturnWithMoney(sellno, "frmStatisticsRecord", "");
                 frmMainShopSimpleReturnWithMoney.frmName  = base.Name;
                 frmMainShopSimpleReturnWithMoney.Location = new Point(base.Location.X, base.Location.Y);
                 frmMainShopSimpleReturnWithMoney.Show();
                 frmMainShopSimpleReturnWithMoney.Focus();
             }
         }
     }
     catch (Exception ex)
     {
         ex.ToString();
     }
 }
示例#3
0
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (e.ColumnIndex == 0 && e.RowIndex == -1)
         {
             string    headerText = dataGridView1.Columns[e.ColumnIndex].HeaderText;
             string    sql        = "SELECT ms.sellNo as sellNo, ms.sellTime, cr.Name as Name, ms.memberId as memberId, (ms.sum-ms.sumDiscount) as sum, ms.cash as cash, ms.Credit as Credit, ms.items as items, ms.itemstotal as itemstotal, ms.status as status, ds.sellNoCount as sellNoCount, ms.returnChange as returnChange FROM hypos_main_sell as ms LEFT JOIN hypos_CUST_RTL as cr on cr.VipNo = ms.memberId INNER JOIN ( SELECT ds.sellNo as sellNo, count(ds.sellNo) as sellNoCount FROM hypos_detail_sell as ds GROUP BY ds.sellNo ) as ds on ms.sellNo = ds.sellNo WHERE ms.sellTime  ='" + headerText + "'  ORDER BY ms.sellTime desc";
             DataTable dataTable  = (DataTable)DataBaseUtilities.DBOperation(Program.ConnectionString, sql, null, CommandOperationType.ExecuteReaderReturnDataTable);
             string    sellno     = "";
             if (dataTable.Rows.Count > 0)
             {
                 sellno = (string.IsNullOrEmpty(dataTable.Rows[0]["sellNo"].ToString()) ? "0" : dataTable.Rows[0]["sellNo"].ToString());
             }
             if (Program.SystemMode == 1)
             {
                 frmMainShopSimpleReturn frmMainShopSimpleReturn = new frmMainShopSimpleReturn(sellno, "frmStatisticsRecord", "");
                 frmMainShopSimpleReturn.frmName  = base.Name;
                 frmMainShopSimpleReturn.Location = new Point(base.Location.X, base.Location.Y);
                 frmMainShopSimpleReturn.Show();
                 frmMainShopSimpleReturn.Focus();
             }
             else
             {
                 frmMainShopSimpleReturnWithMoney frmMainShopSimpleReturnWithMoney = new frmMainShopSimpleReturnWithMoney(sellno, "frmStatisticsRecord", "");
                 frmMainShopSimpleReturnWithMoney.frmName  = base.Name;
                 frmMainShopSimpleReturnWithMoney.Location = new Point(base.Location.X, base.Location.Y);
                 frmMainShopSimpleReturnWithMoney.Show();
                 frmMainShopSimpleReturnWithMoney.Focus();
             }
         }
     }
     catch (Exception ex)
     {
         ex.ToString();
     }
 }