internal static SqlCommand Insert_Update_Railways(Railways objEntity) { string ip = System.Web.HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; if (string.IsNullOrEmpty(ip)) { ip = System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]; } var parameters = new[] { CreateParameter("@action", SqlDbType.VarChar, objEntity.action), CreateParameter("@RailwayCode", SqlDbType.VarChar, objEntity.RailwayCode), CreateParameter("@Area", SqlDbType.VarChar, objEntity.Area), CreateParameter("@City", SqlDbType.VarChar, objEntity.City), CreateParameter("@Comments", SqlDbType.VarChar, objEntity.Comments), CreateParameter("@Flag", SqlDbType.Int, Convert.ToInt32(objEntity.Flag)), CreateParameter("@CreatedBy", SqlDbType.Int, Convert.ToInt32(objEntity.CreatedBy)), CreateParameter("@CreatedDate", SqlDbType.VarChar, objEntity.CreatedDate), CreateParameter("@UpdatedBy", SqlDbType.Int, Convert.ToInt32(objEntity.UpdatedBy)), CreateParameter("@UpdatedDate", SqlDbType.VarChar, objEntity.UpdatedDate), }; return(CreateCommand("ins_Railways", parameters)); }
public List <Railways> Insert_Update_Railways(Railways objEntity) { return(SqlHelpers.GetObjects <Railways>(Util.Env, CommandFactory.Insert_Update_Railways(objEntity), AdminObjectFactory.Insert_Update_Railways_Factory)); }