//Update MRP Database public bool DALGRNStatus(LINKPayment objPayment) { bool status = false; int GRNstatus = 9; try { SqlConnection conn = DALConnManager.OpenMRP(); SqlCommand oSqlCommand = new SqlCommand(); string SqlQuery = "WCF_UpdateStatusGRN"; oSqlCommand.Connection = conn; oSqlCommand.CommandText = SqlQuery; oSqlCommand.CommandType = CommandType.StoredProcedure; oSqlCommand.Parameters.AddWithValue("@Status", GRNstatus); oSqlCommand.Parameters.AddWithValue("@GRNNo", objPayment.GRNNo); status = new DALBase().Insert(oSqlCommand); DALConnManager.Close(conn); } catch (Exception ex) { } return(status); }
//FOR MRP public DataTable SelectSPMRP(SqlCommand oSqlCommand) { DataTable dt = new DataTable(); try { SqlConnection conn = DALConnManager.OpenMRP(); oSqlCommand.Connection = conn; oSqlCommand.CommandType = CommandType.StoredProcedure; SqlDataAdapter adp = new SqlDataAdapter(oSqlCommand); adp.Fill(dt); conn.Close(); } catch (Exception ex) { throw; } return(dt); }
public bool UpdateMRP(SqlCommand oSqlCommand) { bool status = false; int rowAffected = 0; try { SqlConnection conn = DALConnManager.OpenMRP(); oSqlCommand.Connection = conn; oSqlCommand.CommandType = CommandType.StoredProcedure; rowAffected = oSqlCommand.ExecuteNonQuery(); DALConnManager.Close(conn); if (rowAffected > 0) { status = true; } } catch (SqlException ex) { throw; } return(status); }