using System;
|
using System.Collections.Generic;
|
using System.ComponentModel;
|
using System.Data;
|
using System.Drawing;
|
using System.Text;
|
using System.Windows.Forms;
|
|
namespace APSM
|
{
|
public partial class KF_LackMaterialAnalyseDetail : Form
|
{
|
public KF_LackMaterialAnalyseDetail()
|
{
|
InitializeComponent();
|
}
|
public DateTime BDate;
|
public DateTime EDate;
|
public int FixCols = 12;
|
public string sWLDM;
|
|
public void LoadData()
|
{
|
int i ;
|
int c ;
|
int n ;
|
bool bNull;
|
for(i=grdMain.FixedRows;i<grdMain.Rows;i++)
|
{
|
grdMain.set_RowHidden(i,false);
|
if(DBUtility.ClsPub.isStrNull(grdMain.get_TextMatrix(i, 0)) != sWLDM)
|
{
|
grdMain.set_RowHidden(i, true);
|
}
|
if(DBUtility.ClsPub.isStrNull( grdMain.get_RowData(i)) == "*" )
|
{
|
grdMain.RemoveItem(i);
|
}
|
}
|
i = 0;
|
n = 0;
|
c = 0;
|
for(i=grdMain.FixedRows;i<grdMain.Rows;i++)
|
{
|
if( grdMain.get_RowHidden(i) == false )
|
{
|
n = n + 1;
|
}
|
}
|
if( n == 0 )
|
return;
|
|
//'ºÏ¼Æ
|
grdMain.Rows = grdMain.Rows + 1;
|
grdMain.set_RowData(grdMain.Rows - 1, "*");
|
for(i=4;i<grdMain.Cols;i++)
|
{
|
if( i != 7 || i != 8 || i!= 9 || i != 10 )
|
{
|
n = 0;
|
for(c=grdMain.FixedRows;c<grdMain.Rows;c++)
|
{
|
if( grdMain.get_RowHidden(c) == false )
|
{
|
n = n + DBUtility.ClsPub.isInt(grdMain.get_TextMatrix(c, i));
|
}
|
|
}
|
grdMain.set_TextMatrix(grdMain.Rows - 1, i, n.ToString());
|
}
|
}
|
grdMain.set_Cell(VSFlex7.CellPropertySettings.flexcpBackColor, grdMain.Rows - 1, 0, grdMain.Rows - 1, grdMain.Cols - 1 , DBUtility.ClsPub.Enum_Color.hx_Control);
|
}
|
|
public void initGrid()
|
{
|
grdMain.Rows = 2;
|
grdMain.FixedRows = 2;
|
grdMain.Cols = 12;
|
grdMain.FixedCols = 0;
|
grdMain.AllowBigSelection = true;
|
grdMain.AllowSelection = true;
|
grdMain.RowHeightMin = 300;
|
grdMain.FixedCols = 0;
|
grdMain.ScrollTrack = true;
|
grdMain.AllowUserResizing = VSFlex7.AllowUserResizeSettings.flexResizeColumns;
|
grdMain.set_TextMatrix(0, 0, "ÎïÁÏ´úÂë");
|
grdMain.set_TextMatrix(0, 1, "ÎïÁÏÃû³Æ");
|
grdMain.set_TextMatrix(0, 2, "ÎïÁÏÐͺÅ");
|
grdMain.set_TextMatrix(0, 3, "ÈÎÎñµ¥");
|
grdMain.set_TextMatrix(0, 4,"Ó¦·¢Êý");
|
grdMain.set_TextMatrix(0, 5, "ÒÑ·¢Êý");
|
grdMain.set_TextMatrix(0, 6, "²¹ÁÏÊý");
|
grdMain.set_TextMatrix(0, 7, "Åɹ¤µ¥ºÅ");
|
grdMain.set_TextMatrix(0, 8, "²úÆ·´úÂë");
|
grdMain.set_TextMatrix(0, 9, "²úÆ·Ãû³Æ");
|
grdMain.set_TextMatrix(0, 10, "»ų́ºÅ");
|
grdMain.set_TextMatrix(0, 11, "ºÏ¼Æ");
|
grdMain.FrozenCols = 11;
|
LoadDateCol(28);
|
grdMain.set_RowHeight(0, 450);
|
grdMain.set_RowHidden(1, true);
|
}
|
|
public void LoadDateCol(int iDates)
|
{
|
Sc_ICMOSortBillFun.LoadDateCol(grdMain, FixCols, iDates);
|
}
|
|
private void KF_LackMaterialAnalyseDetail_Load(object sender, EventArgs e)
|
{
|
//initGrid();
|
if (sWLDM.Trim() != "")
|
{
|
LoadData();
|
}
|
}
|
|
private void tc_Click(object sender, EventArgs e)
|
{
|
this.Visible = false;
|
}
|
|
private void bclk_Click(object sender, EventArgs e)
|
{
|
//±£´æÁпí
|
Sc_ICMOSortBillFun.SaveGrid(grdMain, this.Name);
|
}
|
|
private void mrlk_Click(object sender, EventArgs e)
|
{
|
Sc_ICMOSortBillFun.DefaultGrid(grdMain);
|
}
|
}
|
}
|