Example #1
0
        private void btnQry_Click(object sender, EventArgs e)
        {
            if (txtStorage.Text.Trim() == "")
            {
                this.ShowAlertMessage("请选择仓库!");
                return;
            }

            if (txtMaterialGuid.Text == "")
            {
                this.ShowAlertMessage("请选择物料!");
                return;
            }


            string strMaterialGuid = "";

            if (txtMaterialGuid.Tag != null)
            {
                strMaterialGuid = txtMaterialGuid.Tag.ToString();
            }



            StatReportManage StatReportManage = new StatReportManage();

            gridControl1.DataSource = StatReportManage.StockDetailReport(strMaterialGuid, txtStorage.Tag.ToString());

            //用于打印
            DataTable dtl3 = base.GetDataTable((DataView)gridView1.DataSource);

            ds.Tables.Clear();
            ds.Tables.Add(dtl3.Copy());
            ds.Tables[0].TableName = "StockDetailReport";
        }
Example #2
0
        private void LoadData(string strsql)
        {
            DataTable dtl = new DataTable();
            StatReportManage StatReportManage = new StatReportManage();
            dtl = StatReportManage.sp_OtherSellOrderDetail_Report(strsql);

            this.gridControl1.DataSource = dtl;
        }
Example #3
0
        private void LoadData(string strsql)
        {
            DataTable        dtl = new DataTable();
            StatReportManage StatReportManage = new StatReportManage();

            dtl = StatReportManage.sp_Consign_Report(strsql);

            this.gridControl1.DataSource = dtl;
        }
Example #4
0
        private void btnQry_Click(object sender, EventArgs e)
        {
            if (txtStorage.Text.Trim() == "")
            {
                this.ShowAlertMessage("请选择仓库!");
                return;
            }

            if (dtpEndDate.Text.Trim() == "")
            {
                this.ShowAlertMessage("请选择截止日期!");
                return;
            }


            string strMaterialGuid = "";

            if (txtMaterialGuid.Tag != null)
            {
                strMaterialGuid = txtMaterialGuid.Tag.ToString();
            }

            string strMaterialType = "";

            if (txtMaterialType.Tag != null)
            {
                strMaterialType = txtMaterialType.Tag.ToString();
            }



            StatReportManage StatReportManage = new StatReportManage();

            gridControl1.DataSource = StatReportManage.StockReport(strMaterialGuid, txtStorage.Tag.ToString(), strMaterialType, dtpEndDate.Text.Trim() + " 23:59:59");

            //用于打印
            DataTable dtl3 = base.GetDataTable((DataView)gridView1.DataSource);

            ds.Tables.Clear();
            ds.Tables.Add(dtl3.Copy());
            ds.Tables[0].TableName = "StockReport";



            //权限判断
            if (rightgroupManage.IsOperateRightByUserID(SysParams.UserID, "IsDisplayPrice", "IsDisplayPrice") == false)
            {
                gridView1.Columns["Price"].Visible         = false;
                gridView1.Columns["MaterialMoney"].Visible = false;

                gridView1.Columns["Price2"].Visible         = false;
                gridView1.Columns["MaterialMoney2"].Visible = false;
            }
        }
Example #5
0
        private void tsbQry_Click(object sender, EventArgs e)
        {
            StatReportManage StatReportManage = new StatReportManage();

            gridControl1.DataSource = StatReportManage.sp_ProcessProduct("");


            ////权限判断
            if (rightgroupManage.IsOperateRightByUserID(SysParams.UserID, "IsDisplayPrice", "IsDisplayPrice") == false)
            {
                gridView1.Columns["Price"].Visible         = false;
                gridView1.Columns["MaterialMoney"].Visible = false;

                gridView1.Columns["Price2"].Visible         = false;
                gridView1.Columns["MaterialMoney2"].Visible = false;
            }
        }
Example #6
0
        private void btnQry_Click(object sender, EventArgs e)
        {
            gridView1.Columns.Clear();

            if (dtpBeginDate.Text.Trim() == "")
            {
                this.ShowAlertMessage("请选择开始日期!");
                return;
            }


            if (dtpEndDate.Text.Trim() == "")
            {
                this.ShowAlertMessage("请选择截止日期!");
                return;
            }



            StatReportManage StatReportManage = new StatReportManage();
            DataTable        dtl = StatReportManage.sp_Payment_Report(dtpBeginDate.Text, dtpEndDate.Text);

            this.gridControl1.DataSource = dtl;

            for (int i = 1; i < gridView1.Columns.Count; i++)
            {
                gridView1.Columns[i].DisplayFormat.FormatType   = FormatType.Numeric;
                gridView1.Columns[i].DisplayFormat.FormatString = "0.####";
            }


            gridView1.Columns["合计"].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum;
            gridView1.Columns["合计"].SummaryItem.FieldName   = "合计";

            gridView1.GroupSummary.Add(DevExpress.Data.SummaryItemType.Sum, "合计", gridView1.Columns["合计"], "小计:{0:N2}");  //可以显示小计
            gridView1.OptionsView.ShowFooter = true;



            //用于打印
            //DataTable dtl3 = base.GetDataTable((DataView)gridView1.DataSource);
            //ds.Tables.Clear();
            //ds.Tables.Add(dtl3.Copy());
            //ds.Tables[0].TableName = "PaymentOrderReport";
        }
Example #7
0
        public void LoadData(string strMaterialGuid)
        {
            MaterialManage MaterialManage = new MaterialManage();
            Material       material       = new Material();

            material = MaterialManage.GetMaterialByGuid(strMaterialGuid);

            txtMaterialID.Text   = material.MaterialID;
            txtMaterialName.Text = material.MaterialName;
            txtSpec.Text         = base.GetBasicDataNameByID(material.Spec);
            txtUnit.Text         = base.GetBasicDataNameByID(material.Unit);


            StatReportManage StatReportManage = new StatReportManage();
            DataTable        dtl = StatReportManage.sp_GetStorageSumBatchNo(strMaterialGuid);

            gridControl1.DataSource = dtl;
        }
        private void btnQry_Click(object sender, EventArgs e)
        {
            DataTable        dtl = new DataTable();
            StatReportManage StatReportManage = new StatReportManage();

            string strValue = "";

            if (chkEnd.Checked == true)
            {
                strValue = "1"; //已勾结
            }

            if (txtSupplierGuid.Tag == null)
            {
                txtSupplierGuid.Tag = "";
            }

            dtl = StatReportManage.sp_GetStockInOrderStatus_Report(txtStockInOrderID.Text.Replace("'", "''"), dtpBeginDate.Text, dtpEndDate.Text, txtSupplierGuid.Tag.ToString(), strValue);

            this.gridControl1.DataSource = dtl;
        }
Example #9
0
        //库存查询
        private void btnQty_Click(object sender, EventArgs e)
        {
            if (txtStorage.Text.Trim() == "")
            {
                this.ShowAlertMessage("请选择仓库!");
                return;
            }

            if (dtpBeginDate.Text.Trim() == "")
            {
                this.ShowAlertMessage("请选择截止日期!");
                return;
            }


            string strMaterialGuid = "";

            if (txtMaterialGuid.Tag != null)
            {
                strMaterialGuid = txtMaterialGuid.Tag.ToString();
            }

            string strMaterialType = "";

            if (txtMaterialType.Tag != null)
            {
                strMaterialType = txtMaterialType.Tag.ToString();
            }

            string strSupplierGuid = "";

            if (txtSupplier.Tag != null)
            {
                strSupplierGuid = txtSupplier.Tag.ToString();
            }



            StatReportManage StatReportManage = new StatReportManage();

            if (chkView.Checked == true)
            {
                DataTable dtl = new DataTable();
                dtl = StatReportManage.sp_GetInOutStorageSum(dtpBeginDate.Text + " 00:00:00", dtpEndDate.Text + " 23:59:59", strMaterialGuid, txtStorage.Tag.ToString(), strMaterialType, strSupplierGuid);
                gridControl1.DataSource = dtl;
            }
            else
            {
                //进出为0显示没勾上,期初进出结存都为0不显示也没勾上
                if (chkView2.Checked == false)
                {
                    DataTable dtl  = new DataTable();
                    DataTable dtl2 = new DataTable();
                    dtl  = StatReportManage.sp_GetInOutStorageSum(dtpBeginDate.Text + " 00:00:00", dtpEndDate.Text + " 23:59:59", strMaterialGuid, txtStorage.Tag.ToString(), strMaterialType, strSupplierGuid);
                    dtl2 = GetNewDataTable(dtl, " BQInOnlySum>0 or BQInOnlySum<0 or BQOutOnlySum>0 or BQOutOnlySum<0 ");
                    gridControl1.DataSource = dtl2;
                }
                else
                {
                    //进出为0显示没勾上,期初进出结存都为0不显示勾上了
                    if (chkView2.Checked == true)
                    {
                        DataTable dtl  = new DataTable();
                        DataTable dtl2 = new DataTable();
                        dtl  = StatReportManage.sp_GetInOutStorageSum(dtpBeginDate.Text + " 00:00:00", dtpEndDate.Text + " 23:59:59", strMaterialGuid, txtStorage.Tag.ToString(), strMaterialType, strSupplierGuid);
                        dtl2 = GetNewDataTable(dtl, " QCOnlySum>0 or QCOnlySum<0 or BQInOnlySum>0 or BQInOnlySum<0 or BQOutOnlySum>0 or BQOutOnlySum<0  ");
                        gridControl1.DataSource = dtl2;
                    }
                }
            }

            //权限判断
            if (rightgroupManage.IsOperateRightByUserID(SysParams.UserID, "IsDisplayPrice", "IsDisplayPrice") == false)
            {
                bandedGridView1.Columns["JCOnlyMoney"].Visible    = false;
                bandedGridView1.Columns["QCOnlyMoney"].Visible    = false;
                bandedGridView1.Columns["BQOutOnlyMoney"].Visible = false;
                bandedGridView1.Columns["BQInOnlyMoney"].Visible  = false;
            }
        }