using System;
|
using System.Collections.Generic;
|
using System.ComponentModel;
|
using System.Data;
|
using System.Drawing;
|
using System.Text;
|
using System.Windows.Forms;
|
|
namespace BaseSet
|
{
|
public partial class Gy_DataIn_HaiYan :BLL.Gy_DataInTmp
|
{
|
public Gy_DataIn_HaiYan()
|
{
|
InitializeComponent();
|
}
|
|
public int kname = 0;
|
public int pname = 1;
|
public int ptuhao = 2;
|
public int jixing = 3;
|
public int pcolour = 4;
|
public int qita = 5;
|
//
|
public int strg1 = 6;
|
public int strg2 = 7;
|
public int strg3 = 8;
|
public int strg4 = 9;
|
public int strg5 = 10;
|
public int strg6 = 11;
|
public int strg7 = 12;
|
public int strg8 = 13;
|
public int strg9 = 14;
|
public int strg10 = 15;
|
public int strg11 = 16;
|
public int strg12 = 17;
|
public int strg13 = 18;
|
public int strg14 = 19;
|
//
|
public int strm1 = 31;
|
public int strm2 = 32;
|
public int strm3 = 33;
|
public int strm4 = 34;
|
public int strm5 = 35;
|
public int strm6 = 36;
|
public int strm7 = 37;
|
public int strm8 = 38;
|
public int strm9 = 39;
|
public int strm10 = 40;
|
public int strm11 = 41;
|
public int strm12 = 42;
|
public int strm13 = 43;
|
public int strm14 = 44;
|
public int strm15 = 45;
|
public int strm16 = 46;
|
//
|
public const int HBeginRow = 2; //ÓÐЧÊý¾Ý£¬¿ªÊ¼ÐÐÊý
|
//
|
public DAL.ClsProduct_Add oBill = new DAL.ClsProduct_Add();
|
|
/// <summary>
|
/// ³õʼ»¯½çÃæ
|
/// </summary>
|
public override void initData()
|
{
|
base.initData();
|
base.sSheetName = "Sheet2";
|
base.ModRightName = "Gy_DataIn_HotWater";
|
base.ModRightNameCheck = base.ModRightName + base.ModRightNameCheck;
|
base.ModRightNameClose = base.ModRightName + base.ModRightNameClose;
|
base.ModRightNameDelete = base.ModRightName + base.ModRightNameDelete;
|
base.ModRightNameEdit = base.ModRightName + base.ModRightNameEdit;
|
base.ModRightNameMoney = base.ModRightName + base.ModRightNameMoney;
|
base.ModRightNameQty = base.ModRightName + base.ModRightNameQty;
|
//
|
DBUtility.Gy_BaseFun.SetComboxYear(cmbHYear);
|
DBUtility.Gy_BaseFun.SetComboxPeriod(cmbHPeriod);
|
//
|
}
|
|
public override void Sub_DataIn()
|
{
|
//base.Sub_DataIn();
|
//
|
for (int i = HBeginRow; i <= grdMain.Rows.Count - 1; i++)
|
{
|
if (DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[kname].Value) != "")
|
{
|
//дÈëÀà
|
if (WriteClass(i))
|
{
|
//±£´æ¼Ç¼
|
if (!oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo))
|
{
|
MessageBox.Show("µ¼Èëʧ°Ü!ÔÒò:" + DBUtility.ClsPub.sExeReturnInfo, "Ìáʾ");
|
return;
|
}
|
}
|
}
|
}
|
MessageBox.Show("µ¼ÈëÍê±Ï");
|
grdMain.DataSource = null;
|
}
|
|
//дÈëÀà ´Ó¿Ø¼þ
|
private bool WriteClass(int row)
|
{
|
//дÈëÐÅÏ¢
|
oBill.omodel1.kname = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[kname].Value);
|
oBill.omodel1.pname = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[pname].Value);
|
oBill.omodel1.ptuhao = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[ptuhao].Value);
|
oBill.omodel1.jixing = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[jixing].Value);
|
oBill.omodel1.pcolour = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[pcolour].Value);
|
oBill.omodel1.qita = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[qita].Value);
|
//
|
oBill.omodel2.strg1 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strg1].Value);
|
oBill.omodel2.strg2 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strg2].Value);
|
oBill.omodel2.strg3 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strg3].Value);
|
oBill.omodel2.strg4 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strg4].Value);
|
oBill.omodel2.strg5 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strg5].Value);
|
oBill.omodel2.strg6 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strg6].Value);
|
oBill.omodel2.strg7 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strg7].Value);
|
oBill.omodel2.strg8 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strg8].Value);
|
oBill.omodel2.strg9 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strg9].Value);
|
oBill.omodel2.strg10 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strg10].Value);
|
oBill.omodel2.strg11 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strg11].Value);
|
oBill.omodel2.strg12 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strg12].Value);
|
oBill.omodel2.strg13 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strg13].Value);
|
oBill.omodel2.strg14 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strg14].Value);
|
//
|
oBill.omodel3.strm1 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strm1].Value);
|
oBill.omodel3.strm2 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strm2].Value);
|
oBill.omodel3.strm3 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strm3].Value);
|
oBill.omodel3.strm4 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strm4].Value);
|
oBill.omodel3.strm5 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strm5].Value);
|
oBill.omodel3.strm6 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strm6].Value);
|
oBill.omodel3.strm7 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strm7].Value);
|
oBill.omodel3.strm8 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strm8].Value);
|
oBill.omodel3.strm9 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strm9].Value);
|
oBill.omodel3.strm10 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strm10].Value);
|
oBill.omodel3.strm11 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strm11].Value);
|
oBill.omodel3.strm12 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strm12].Value);
|
oBill.omodel3.strm13 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strm13].Value);
|
oBill.omodel3.strm14 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strm14].Value);
|
oBill.omodel3.strm15 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strm15].Value);
|
oBill.omodel3.strm16 = DBUtility.ClsPub.isStrNull(grdMain.Rows[row].Cells[strm16].Value);
|
return true;
|
}
|
|
|
|
}
|
}
|