111,126
社区成员
发帖
与我相关
我的任务
分享
PosGroup.Lane.Row[m].Col[n].Layer[h].Pos.PosState = Convert.ToInt32(ds1.Tables[0].Rows[i]["Pos_State"]);
if(ds1.Tables[0].Rows.Count>0)
{
for (int i = 0; i < ds1.Tables[0].Rows.Count;i++ )
{
PosGroup.LastUpdateTime = Convert.ToInt32(ds1.Tables[0].Rows[i]["UPD"]);
IRow = Convert.ToInt32(ds1.Tables[0].Rows[i]["NO_Line"]) - 1;
ICol = Convert.ToInt32(ds1.Tables[0].Rows[i]["NO_Col"]) - 1;
ILayer = Convert.ToInt32(ds1.Tables[0].Rows[i]["NO_Layer"]) - 1;
var lane = PosGroup.Lane;
var row = lane.Row;
for (int m = 0; m <= IRow; m++)
{
PosGroup.Lane.Row[m] = new WMS_test.publicpra.TRow();
for (int n = 0; n <= ICol; ICol++)
{
PosGroup.Lane.Row[m].Col[n] = new WMS_test.publicpra.TCol();
for (int h = 0; h <= ILayer; h++)
{
PosGroup.Lane.Row[m].Col[n].Layer[h] = new WMS_test.publicpra.TLayer();
PosGroup.Lane.Row[m].Col[n].Layer[h].Pos.PosState = Convert.ToInt32(ds1.Tables[0].Rows[i]["Pos_State"]);
PosGroup.Lane.Row[m].Col[n].Layer[h].Pos.Zone_ID = Convert.ToInt32(ds1.Tables[0].Rows[i]["Zone_ID"]);
PosGroup.Lane.Row[m].Col[n].Layer[h].Pos.PID = Convert.ToInt32(ds1.Tables[0].Rows[i]["PID"]);
PosGroup.Lane.Row[m].Col[n].Layer[h].Pos.HasSetValue = true;
}
}
}
var lane = PosGroup.Lane;
var row = lane.Row;
for (int m = 0; m <= IRow; m++)
{
PosGroup.Lane.Row[m] = new TRow();
for (int n = 0; n <= ICol; ICol++)
{
PosGroup.Lane.Row[m].Col[n] = new TCol();
for (int h = 0; h <= ILayer; h++)
{
PosGroup.Lane.Row[m].Col[n].Layer[h] = new TLayer();
PosGroup.Lane.Row[m].Col[n].Layer[h].Pos.PosState = Convert.ToInt32(ds1.Tables[0].Rows[i]["Pos_State"]);
PosGroup.Lane.Row[m].Col[n].Layer[h].Pos.Zone_ID = Convert.ToInt32(ds1.Tables[0].Rows[i]["Zone_ID"]);
PosGroup.Lane.Row[m].Col[n].Layer[h].Pos.PID = Convert.ToInt32(ds1.Tables[0].Rows[i]["PID"]);
PosGroup.Lane.Row[m].Col[n].Layer[h].Pos.HasSetValue = true;
}
}
}
if(ds1.Tables[0].Rows.Count>0)
{
for (int i = 0; i < ds1.Tables[0].Rows.Count;i++ )
{
PosGroup.LastUpdateTime = Convert.ToInt32(ds1.Tables[0].Rows[i]["UPD"]);
IRow = Convert.ToInt32(ds1.Tables[0].Rows[i]["NO_Line"]) - 1;
ICol = Convert.ToInt32(ds1.Tables[0].Rows[i]["NO_Col"]) - 1;
ILayer = Convert.ToInt32(ds1.Tables[0].Rows[i]["NO_Layer"]) - 1;
//PosGroup.Lane = new publicpra.TLane();
//PosGroup.Lane.Row = new publicpra.TRow[2];
//PosGroup.Lane.Row[IRow].Col = new publicpra.TCol[14];
//PosGroup.Lane.Row[IRow].Col[ICol].Layer = new publicpra.TLayer[11];
//PosGroup.Lane.Row[IRow].Col[ICol].Layer[ILayer].Pos = new publicpra.TPos();
for(int m=0;m<=IRow;m++)
{
for (int n = 0; n <= ICol; ICol++)
{
for (int h = 0; h <= ILayer;h++ )
{
PosGroup.Lane.Row[m].Col[n].Layer[h].Pos.PosState = Convert.ToInt32(ds1.Tables[0].Rows[i]["Pos_State"]);
PosGroup.Lane.Row[m].Col[n].Layer[h].Pos.Zone_ID = Convert.ToInt32(ds1.Tables[0].Rows[i]["Zone_ID"]);
PosGroup.Lane.Row[m].Col[n].Layer[h].Pos.PID = Convert.ToInt32(ds1.Tables[0].Rows[i]["PID"]);
PosGroup.Lane.Row[m].Col[n].Layer[h].Pos.HasSetValue = true;
}
}
}
}public class TPosGroup
{
public TLane Lane = new TLane();
}
public class TLane
{
public TRow[] Row = new TRow[100];
}
public class TRow
{
public TCol[] Col = new TCol[100];
}
public class TCol
{
public TLayer[] Layer = new TLayer[100];
}
public class TLayer
{
public TPos Pos = new TPos();
}
public class TPos
{
public long PID;
public int PosState;
public int TypeOfState;
public int TypeOfCusID;
public int Zone_ID;
public bool HasSetValue;
}
public struct TPosGroup
{
public TLane Lane;
}
public struct TLane
{
public TRow[] Row;
}
public struct TRow
{
public TCol[] Col;
}
public struct TCol
{
public TLayer[] Layer;
}
public struct TLayer
{
public TPos Pos;
}
public struct TPos
{
public long PID;
public int PosState;
public int TypeOfState;
public int TypeOfCusID;
public int Zone_ID;
public bool HasSetValue;
}