110,024
社区成员




MSSQLConn conn = DBConn.MSSQL;
SqlConnection m_conn = conn.Conn;
SqlCommand UpdateH = new SqlCommand("t_BJ_BJUpdate", m_conn);
UpdateH.CommandType = CommandType.StoredProcedure;
SqlCommand insertM = new SqlCommand("t_BJ_BJsInsert", m_conn);
insertM.CommandType = CommandType.StoredProcedure;
SqlDataAdapter sda = new SqlDataAdapter();
sda.InsertCommand = insertM;
sda.TableMappings.Add("Bs", "t_BjBills");
SqlParameterCollection sqlp = insertM.Parameters;
sqlp.Add("@BJID", SqlDbType.Int);
sqlp.Add("@inid", SqlDbType.Int, 4, "inid");
sqlp.Add("@InvID", SqlDbType.Int, 4, "InvID");
sqlp.Add("@Qty", SqlDbType.Money, 8, "Qty");
sqlp.Add("@Cost", SqlDbType.Money, 8, "Cost");
sqlp.Add("@ReBatch", SqlDbType.NVarChar, 30, "ReBatch");
sqlp.Add("@Quo", SqlDbType.Float, 8, "Quo");
sqlp.Add("@TaxP", SqlDbType.Money, 8, "TaxP");
sqlp.Add("@SumP", SqlDbType.Money, 8, "SumP");
sqlp.Add("@Term", SqlDbType.NVarChar, 4, "Term");
sqlp.Add("@RQty", SqlDbType.Money, 8, "RQty");
sqlp.Add("@RSumP", SqlDbType.Money, 8, "RSumP");
sqlp.Add("@RDate", SqlDbType.DateTime, 8, "RDate");
sqlp.Add("@CusID", SqlDbType.Int);
sqlp.Add("@Memo", SqlDbType.NVarChar, 40, "Memo");
sqlp["@CusID"].Value = bill.B[0].CusID;
sqlp["@BJID"].Value = bill.B[0].BJID;