Пример #1
0
        private static void testETL()
        {
            clsMAST_INSR_POLICY_TB clstb = new clsMAST_INSR_POLICY_TB();
            clsMAST_INSR_POLICY_TB_MIRROR clstb_m = new clsMAST_INSR_POLICY_TB_MIRROR();
            clsMAST_INSR_POLICY_TB_MIRROR.TableClear();

            DataTable dt = clstb.Select();

            //DatabaseLayer.DataBaseConnection.SqlConnection_.Close();
            //DatabaseLayer.DataBaseConnection.SqlConnection_ = new SqlConnection(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\project\InsuranceHedgeProject\InsruranceHedge_sln\InsuranceHedge\HedgeSystemAsh.mdf;Integrated Security=True");
            int i = 1;
            foreach (DataRow dr in dt.Select())
            {
                clsMAST_INSR_POLICY_TB_MIRROR.Create(dr).Insert();
                Console.WriteLine(i);
                i = i + 1;
            }

        }
Пример #2
0
		public clsMAST_INSR_POLICY_TB Clone()
		{
			try
			{
				clsMAST_INSR_POLICY_TB cloneTB = new clsMAST_INSR_POLICY_TB();
				
				
				cloneTB._Cal_Date = this._Cal_Date;
				cloneTB._Pdt_Type = this._Pdt_Type;
				cloneTB._Sales_Ch = this._Sales_Ch;
				cloneTB._Po_Date = this._Po_Date;
				cloneTB._IR_Code = this._IR_Code;
				cloneTB._Po_PmType = this._Po_PmType;
				cloneTB._Po_No = this._Po_No;
				cloneTB._C_Rate = this._C_Rate;
				cloneTB._Acc_No = this._Acc_No;
				cloneTB._Mc_FA = this._Mc_FA;
				cloneTB._Gs_Prem = this._Gs_Prem;
				cloneTB._Mc_Prem = this._Mc_Prem;
				cloneTB._Sb_Prem = this._Sb_Prem;
				cloneTB._Sp_Prem = this._Sp_Prem;
				cloneTB._Poh1_Age = this._Poh1_Age;
				cloneTB._Poh2_Age = this._Poh2_Age;
				cloneTB._Poh1_Sex = this._Poh1_Sex;
				cloneTB._Poh2_Sex = this._Poh2_Sex;
				cloneTB._N_Prd = this._N_Prd;
				cloneTB._N1_Prd = this._N1_Prd;
				cloneTB._M_Prd = this._M_Prd;
				cloneTB._Pdt_Code = this._Pdt_Code; 
				
				return cloneTB;
			}
			catch(Exception ex)
			{
				throw new Exception(ex.Message);
			}
		}
Пример #3
0
		public static clsMAST_INSR_POLICY_TB Create(DataRow dr)
		{
			try
			{
				clsMAST_INSR_POLICY_TB tb = new clsMAST_INSR_POLICY_TB();
				
				
				tb._Cal_Date = Convert.ToString(dr[0]);
				tb._Pdt_Type = Convert.ToInt32(dr[1]);
				tb._Sales_Ch = Convert.ToInt32(dr[2]);
				tb._Po_Date = Convert.ToString(dr[3]);
				tb._IR_Code = Convert.ToInt32(dr[4]);
				tb._Po_PmType = Convert.ToInt32(dr[5]);
				tb._Po_No = Convert.ToInt32(dr[6]);
				tb._C_Rate = Convert.ToDouble(dr[7]);
				tb._Acc_No = Convert.ToInt32(dr[8]);
				tb._Mc_FA = Convert.ToDouble(dr[9]);
				tb._Gs_Prem = Convert.ToDouble(dr[10]);
				tb._Mc_Prem = Convert.ToDouble(dr[11]);
				tb._Sb_Prem = Convert.ToDouble(dr[12]);
				tb._Sp_Prem = Convert.ToDouble(dr[13]);
				tb._Poh1_Age = Convert.ToInt32(dr[14]);
				tb._Poh2_Age = Convert.ToInt32(dr[15]);
				tb._Poh1_Sex = Convert.ToInt32(dr[16]);
				tb._Poh2_Sex = Convert.ToInt32(dr[17]);
				tb._N_Prd = Convert.ToInt32(dr[18]);
				tb._N1_Prd = Convert.ToInt32(dr[19]);
				tb._M_Prd = Convert.ToInt32(dr[20]);
				tb._Pdt_Code = Convert.ToInt32(dr[21]); 
				
				return tb;
			}
			catch(Exception ex)
			{
				throw new Exception(ex.Message);
			}
		}